home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 5 / Apprentice-Release5.iso / Information / CSMP Digest / volume 3 / csmp-digest-v3-050 < prev    next >
Text File  |  1995-12-31  |  133KB  |  3,199 lines

  1. Received-Date: Wed, 10 Aug 1994 13:16:55 +0200
  2. From: pottier@clipper.ens.fr (Francois Pottier)
  3. Subject: csmp-digest-v3-050
  4. To: csmp-digest@ens.fr
  5. Date: Wed, 10 Aug 1994 13:16:49 +0200 (MET DST)
  6. X-Mailer: ELM [version 2.4 PL23]
  7. Mime-Version: 1.0
  8. Content-Type: text/plain; charset=ISO-8859-1
  9. Content-Transfer-Encoding: 8bit
  10. Errors-To: listman@ens.fr
  11. Reply-To: pottier@clipper.ens.fr
  12. X-Sequence: 55
  13.  
  14. C.S.M.P. Digest             Wed, 10 Aug 94       Volume 3 : Issue 50
  15.  
  16. Today's Topics:
  17.  
  18.         Detecting Apple Events on launch?
  19.         Dialogs and fonts...
  20.         Filtering Edit Text items
  21.         MoreFiles 1.2 available on ftp.apple.com
  22.         Styled Text in Dialogs
  23.         The shock of the new (mac vs unix)
  24.         What does "reentrant" mean?
  25.  
  26.  
  27.  
  28. The Comp.Sys.Mac.Programmer Digest is moderated by Francois Pottier
  29. (pottier@clipper.ens.fr).
  30.  
  31. The digest is a collection of article threads from the internet newsgroup
  32. comp.sys.mac.programmer.  It is designed for people who read c.s.m.p. semi-
  33. regularly and want an archive of the discussions.  If you don't know what a
  34. newsgroup is, you probably don't have access to it.  Ask your systems
  35. administrator(s) for details.  If you don't have access to news, you may
  36. still be able to post messages to the group by using a mail server like
  37. anon.penet.fi (mail help@anon.penet.fi for more information).
  38.  
  39. Each issue of the digest contains one or more sets of articles (called
  40. threads), with each set corresponding to a 'discussion' of a particular
  41. subject.  The articles are not edited; all articles included in this digest
  42. are in their original posted form (as received by our news server at
  43. nef.ens.fr).  Article threads are not added to the digest until the last
  44. article added to the thread is at least two weeks old (this is to ensure that
  45. the thread is dead before adding it to the digest).  Article threads that
  46. consist of only one message are generally not included in the digest.
  47.  
  48. The digest is officially distributed by two means, by email and ftp.
  49.  
  50. If you want to receive the digest by mail, send email to listserv@ens.fr
  51. with no subject and one of the following commands as body:
  52.     help                        Sends you a summary of commands
  53.     subscribe csmp-digest Your Name    Adds you to the mailing list
  54.     signoff csmp-digest            Removes you from the list
  55. Once you have subscribed, you will automatically receive each new
  56. issue as it is created.
  57.  
  58. The official ftp info is //ftp.dartmouth.edu/pub/csmp-digest.
  59. Questions related to the ftp site should be directed to
  60. scott.silver@dartmouth.edu. Currently no previous volumes of the CSMP
  61. digest are available there.
  62.  
  63. Also, the digests are available to WAIS users.  To search back issues
  64. with WAIS, use comp.sys.mac.programmer.src. With Mosaic, use
  65. http://www.wais.com/wais-dbs/comp.sys.mac.programmer.html.
  66.  
  67.  
  68. -------------------------------------------------------
  69.  
  70. >From chriss@microware.com (Chris Severtson)
  71. Subject: Detecting Apple Events on launch?
  72. Date: Wed, 20 Jul 1994 13:44:09 GMT
  73. Organization: Microware Systems Corp., Des Moines, Iowa
  74.  
  75.  
  76. I have just added support for the core apple events to a hobby
  77. application of mine and they work great!  I am concerned, however,
  78. about detecting apple events upon application launch.  When my
  79. application is launched, it creates an untitled document window, and
  80. if the application was launched because someone double-clicked one of
  81. its documents in the finder, then I do not want the application to
  82. create this untitled document.
  83.  
  84. I tried using EventAvail(highLEvelEventMask, evtPtr) before entering
  85. my main event loop to detect this, but it always tells me there are no
  86. pending high-level events.
  87.  
  88. Is there a better way to detect if you were launched because a user
  89. double-clicked one of your documents in the Finder? (I want to detect
  90. this before I enter my main event loop).
  91.  
  92.  
  93. All help is greatly appreciated,
  94.  
  95. Chris
  96. chriss@microware.com
  97.  
  98.  
  99. +++++++++++++++++++++++++++
  100.  
  101. >From jwbaxter@olympus.net (John W. Baxter)
  102. Date: Wed, 20 Jul 1994 09:35:10 -0700
  103. Organization: Internet for the Olympic Peninsula
  104.  
  105. In article <1994Jul20.134409.27760@microware.com>, chriss@microware.com
  106. (Chris Severtson) wrote:
  107.  
  108. > I have just added support for the core apple events to a hobby
  109. > application of mine and they work great!  I am concerned, however,
  110. > about detecting apple events upon application launch.  When my
  111. > application is launched, it creates an untitled document window, and
  112. > if the application was launched because someone double-clicked one of
  113. > its documents in the finder, then I do not want the application to
  114. > create this untitled document.
  115. > I tried using EventAvail(highLEvelEventMask, evtPtr) before entering
  116. > my main event loop to detect this, but it always tells me there are no
  117. > pending high-level events.
  118. > Is there a better way to detect if you were launched because a user
  119. > double-clicked one of your documents in the Finder? (I want to detect
  120. > this before I enter my main event loop).
  121.  
  122. This is pretty well spelled out in Inside Mac: Interapplication Communication.
  123.  
  124. Briefly:  if Apple events are not implemented (ie, you still support
  125. archiac pre-7 Systems), do the old thing with the application parameters.
  126.  
  127. If Apple events ARE implemented, when your program is launched just do
  128. your no-matter-what initialization.  Shortly, you will receive one of:
  129.    'aevt'/'oapp'   meaning:  your app was double-clicked on (or you should
  130. act that way)
  131.    'aevt'/'odoc'   meaning:  the user wants you to open these documents
  132.    'aevt'/'pdoc'   meaning:  the user wants you to print these documents,
  133. bugging him/her as little as possible
  134.  
  135. You'll only get one of these as the aftermath of being launched.  That's
  136. how you decide whether to open an untitled document.  [You can receive
  137. 'odoc' and 'pdoc' later, too.]
  138.  
  139. If Finder wants you to quit after printing as the result of a 'pdoc', it
  140. will send an 'aevt'/'quit' event.  It does that if your app was not
  141. running when the user asked Finder to print the document.
  142.    --John
  143.  
  144. -- 
  145. John Baxter    Port Ludlow, WA, USA  [West shore, Puget Sound]
  146.    No hablo Intel.
  147.    jwbaxter@pt.olympus.net
  148.  
  149. +++++++++++++++++++++++++++
  150.  
  151. >From jcav@kimbark.uchicago.edu (JohnC)
  152. Date: Thu, 21 Jul 1994 05:17:15 GMT
  153. Organization: The Royal Society for Putting Things on Top of Other Things
  154.  
  155. In article <1994Jul20.134409.27760@microware.com> chriss@microware.com (Chris Severtson) writes:
  156. >I have just added support for the core apple events to a hobby
  157. >application of mine and they work great!
  158.  
  159. Cool.  Did you do it by installing event handlers via the Apple Event
  160. Manager?
  161.  
  162. >I am concerned, however, about detecting apple events upon application
  163. >launch.
  164. >
  165. >Is there a better way to detect if you were launched because a user
  166. >double-clicked one of your documents in the Finder? (I want to detect
  167. >this before I enter my main event loop).
  168.  
  169. WHY do you want to do it before the main event loop?  Why not do it as Apple
  170. intended:  -Initialize (installing your Apple Event handlers)
  171.            -Start your even loop
  172.            -pass each high-level event to AEProcessAppleEvent
  173.  
  174. If the Finder launches you, you are guaranteed to get EITHER an
  175. OpenDocuments event OR an OpenApplication event, NOT both.  Your
  176. OpenApplication handler puts up an untitled window, whereas your
  177. OpenDocuments handler opens the specified document or documents but does
  178. not put up an untitled window. Your QuitApplication handler sets a flag that
  179. will cause your event loop to terminate.  Your PrintDocuments handler will
  180. print the specified document or documents.  It really is just about that
  181. simple.  There is some clear sample code in either IM-6 or
  182. IM-Interapplication Communication.
  183.  
  184.  
  185. -- 
  186.   ______     John Cavallino - B0 f++ w c+ g++ k+ s++ e h- pv
  187.   \    /     queer person              
  188.    \  /      EMail: jcav@midway.uchicago.edu
  189.     \/       It should absurdly obvious that I speak ONLY for myself.
  190.  
  191. +++++++++++++++++++++++++++
  192.  
  193. >From mathews@ns9000.furman.edu (Owen Mathews)
  194. Date: 21 Jul 1994 15:02:56 GMT
  195. Organization: furman university computing center
  196.  
  197. Chris Severtson (chriss@microware.com) wrote:
  198.  
  199. : I have just added support for the core apple events to a hobby
  200. : application of mine and they work great!  I am concerned, however,
  201. : about detecting apple events upon application launch.  When my
  202. : application is launched, it creates an untitled document window, and
  203. : if the application was launched because someone double-clicked one of
  204. : its documents in the finder, then I do not want the application to
  205. : create this untitled document.
  206.  
  207. : I tried using EventAvail(highLEvelEventMask, evtPtr) before entering
  208. : my main event loop to detect this, but it always tells me there are no
  209. : pending high-level events.
  210.  
  211. : Is there a better way to detect if you were launched because a user
  212. : double-clicked one of your documents in the Finder? (I want to detect
  213. : this before I enter my main event loop).
  214.  
  215.  
  216. : All help is greatly appreciated,
  217.  
  218. : Chris
  219. : chriss@microware.com
  220.  
  221. Actually, I think it's even simpler than that...
  222.  
  223. The system should *automatically* put an apple event in the event queue when
  224. your application is opened (see previous post); all you should need to do
  225. is go straight to your event loop.  The first event you get with
  226. WaitNextEvent() should be the AppleEvent you need to determine whether or
  227. not the user has double-clicked on a file belonging to you application.
  228. EventAvail() before your loop should also work.
  229.  
  230. IOW, what you posted above *should* work (as far as I know :) ).  The
  231. only reason I can think of why your code does not work is the flags in
  232. the SIZE resource.  Unless you make sure to set the IsHighLevelEventAware
  233. flag, the system won't send you any AppleEvents when it launches your
  234. app.  Set the flag either by making your own SIZE resource with ResEdit,
  235. or by selecting the appropriate option when building your application.
  236.  
  237. Hope this sheds a little light...   :)
  238.  
  239. --
  240.        Owen Mathews    mathews@furman.edu
  241.        <><><><><><><><><><><><><><><><><><><><>
  242.        Furman University, Computer Science Dept
  243.  
  244. +++++++++++++++++++++++++++
  245.  
  246. >From isis@netcom.com (Mike Cohen)
  247. Date: Thu, 21 Jul 1994 18:40:04 GMT
  248. Organization: ISIS International
  249.  
  250. chriss@microware.com (Chris Severtson) writes:
  251.  
  252. When you start up, *don't* create an untitled document; just do the rest of
  253. your initialization and enter your main event loop.Next, you'll receive either
  254. an 'odoc' event if a document was double-clicked or an 'oapp' if only the
  255. application was double-clicked. You should create a new document when you
  256. receive the 'oapp' event. Currently, there will only be one 'oapp' when the
  257. application is started with no documents, but in the future you may receive
  258. them when an already running application is double-clicked in the Finder.
  259.  
  260. >I have just added support for the core apple events to a hobby
  261. >application of mine and they work great!  I am concerned, however,
  262. >about detecting apple events upon application launch.  When my
  263. >application is launched, it creates an untitled document window, and
  264. >if the application was launched because someone double-clicked one of
  265. >its documents in the finder, then I do not want the application to
  266. >create this untitled document.
  267.  
  268. >I tried using EventAvail(highLEvelEventMask, evtPtr) before entering
  269. >my main event loop to detect this, but it always tells me there are no
  270. >pending high-level events.
  271.  
  272. >Is there a better way to detect if you were launched because a user
  273. >double-clicked one of your documents in the Finder? (I want to detect
  274. >this before I enter my main event loop).
  275.  
  276.  
  277. >All help is greatly appreciated,
  278.  
  279. >Chris
  280. >chriss@microware.com
  281.  
  282. -- 
  283. Mike Cohen - isis@netcom.com
  284. NewtonMail, eWorld: MikeC / ALink: D6734 / AOL: MikeC20
  285. Home Page: file://ftp.netcom.com/pub/isis/home.html
  286.  
  287. +++++++++++++++++++++++++++
  288.  
  289. >From gurgle@dnai.com (Pete Gontier)
  290. Date: 26 Jul 1994 17:30:02 GMT
  291. Organization: Integer Poet Software
  292.  
  293. In article <1994Jul21.051715.18936@midway.uchicago.edu>
  294. jcav@kimbark.uchicago.edu (JohnC) writes:
  295.  
  296. > >Is there a better way to detect if you were launched because a user
  297. > >double-clicked one of your documents in the Finder? (I want to detect
  298. > >this before I enter my main event loop).
  299. > WHY do you want to do it before the main event loop?  Why not do it as Apple
  300. > intended:  -Initialize (installing your Apple Event handlers)
  301. >            -Start your even loop
  302. >            -pass each high-level event to AEProcessAppleEvent
  303.  
  304. Because this AE handling model assumes a traditional document-oriented
  305. app. If your app is not such a thing, there may be a decent reason for
  306. you to wait and see whether you are going to get an open-application or
  307. open-documents or print-documents event. I just did it in a Eudora
  308. add-on app I'm writing. I wrote another event loop which calls
  309. WaitNextEvent with a mask which exlcudes everything but AppleEvents.
  310.  
  311. --
  312.  
  313. Pete Gontier // Integer Poet Software // gurgle@dnai.com
  314.  
  315. "Clear-cutting removes all trees... to create new habitats for
  316. wildlife. P&G uses this economically and environmentally sound method
  317. because it most closely mimics nature's own processes. Clear-cutting
  318. also opens the floor to sunshine, thus stimulating growth and providing
  319. food for animals."
  320.  
  321.     -- Procter & Gamble's "Decision Earth" free school curriculum
  322.  
  323. ---------------------------
  324.  
  325. >From Tony Andreoli <Tony_Andreoli_-_CTA@CL_C21SMTP_GW.CHINALAKE.NAVY.MIL>
  326. Subject: Dialogs and fonts...
  327. Date: Sat, 23 Jul 1994 14:00:17 GMT
  328. Organization: Naval Air Warfare Center - Weapons Division
  329.  
  330. I have a dialog that contains a series of editText and staticText fields,
  331. the problem is, I want them to be in Geneva 9!  I understand that
  332. SetDAFont will allow me to adjust the font, but how to I set the point
  333. size (as TextFont and TextSize don't work)?  Think Reference say's
  334. there's no "direct" method, but what about an indirect one?
  335.  
  336. Thanks...
  337. Tony Andreoli
  338.  
  339. +++++++++++++++++++++++++++
  340.  
  341. >From jarezina@magnus.acs.ohio-state.edu (Jasna M. Arezina-Wilson)
  342. Date: Tue, 26 Jul 1994 17:49:55 -0400
  343. Organization: Ohio State University
  344.  
  345. In article <CtEC8H.LHp@avalon.chinalake.navy.mil>, Tony Andreoli
  346. <Tony_Andreoli_-_CTA@CL_C21SMTP_GW.CHINALAKE.NAVY.MIL> wrote:
  347.  
  348. > I have a dialog that contains a series of editText and staticText fields,
  349. > the problem is, I want them to be in Geneva 9!  I understand that
  350. > SetDAFont will allow me to adjust the font, but how to I set the point
  351. > size (as TextFont and TextSize don't work)?  Think Reference say's
  352. > there's no "direct" method, but what about an indirect one?
  353.  
  354. Try this for a function (in C):
  355.  
  356. void SetDialogFontAndSize(DialogPtr theDialog, short fontNum, short
  357. fontSize)
  358. {
  359.     FontInfo    f;
  360.     
  361.     SetPort(theDialog);
  362.     
  363.     // set up the port info
  364.     TextFont(fontNum);
  365.     TextSize(fontSize);
  366.  
  367.     // now deal with the static & edit text issues
  368.     GetFontInfo(&f);
  369.     (*((DialogPeek)theDialog)->textH)->txFont = applFont;
  370.     (*((DialogPeek)theDialog)->textH)->txSize = 9;
  371.     (*((DialogPeek)theDialog)->textH)->lineHeight =
  372.                  f.ascent + f.descent + f.leading;
  373.     (*((DialogPeek)theDialog)->textH)->fontAscent = f.ascent;
  374. }
  375.  
  376.  
  377. However, this will not do it for for buttons, but it will do it for Static
  378. and Edit text fields. Anyone know how to do it for buttons without changing
  379. the system font (since this has the side effect of wrecking the menu font).
  380.  
  381.  
  382. - ----------------------------------------
  383. "...when friends rejoice both far and near
  384.  How can I keep from singing?" - Enya
  385.  
  386. +++++++++++++++++++++++++++
  387.  
  388. >From larson@oahu.cs.ucla.edu (Christopher Larson)
  389. Date: Wed, 27 Jul 94 14:50:58 GMT
  390. Organization: UCLA, Computer Science Department
  391.  
  392. In article <jarezina-260794174955@slip2-33.acs.ohio-state.edu> jarezina@magnus.acs.ohio-state.edu (Jasna M. Arezina-Wilson) writes:
  393. >In article <CtEC8H.LHp@avalon.chinalake.navy.mil>, Tony Andreoli
  394. ><Tony_Andreoli_-_CTA@CL_C21SMTP_GW.CHINALAKE.NAVY.MIL> wrote:
  395. >
  396. >> I have a dialog that contains a series of editText and staticText fields,
  397. >> the problem is, I want them to be in Geneva 9!  I understand that
  398. >> SetDAFont will allow me to adjust the font, but how to I set the point
  399. >> size (as TextFont and TextSize don't work)?  Think Reference say's
  400. >> there's no "direct" method, but what about an indirect one?
  401.  
  402. [Code Deleted...]
  403.  
  404. >However, this will not do it for for buttons, but it will do it for Static
  405. >and Edit text fields. Anyone know how to do it for buttons without changing
  406. >the system font (since this has the side effect of wrecking the menu font).
  407.  
  408. To force controls to use their window's font, simply add the constant useWFont
  409. (or something like that; refer to IM: Mac TB Essentials, "Control Manager"
  410. chapter) to the variation code of the control. No need to change the system
  411. font.
  412.  
  413. --Chris
  414. _______________________________________________________________________________
  415. Chris Larson -- Amateur Macintosh Geek, CoBase Research Assistant
  416. L.A. Institute of Slowly and Painfully Working Out the Surprisingly Obvious
  417. Death to the Trojans! Go Bruins!
  418.  
  419. (Insert disclaimer here)
  420. Internet: larson@kingston.cs.ucla.edu
  421.  
  422. +++++++++++++++++++++++++++
  423.  
  424. >From jarezina@magnus.acs.ohio-state.edu (Jasna M. Arezina-Wilson)
  425. Date: Wed, 27 Jul 1994 13:12:26 -0400
  426. Organization: Ohio State University
  427.  
  428. In article <1994Jul27.145058.17888@cs.ucla.edu>, larson@oahu.cs.ucla.edu
  429. (Christopher Larson) wrote:
  430.  
  431. > To force controls to use their window's font, simply add the constant useWFont
  432. > (or something like that; refer to IM: Mac TB Essentials, "Control Manager"
  433. > chapter) to the variation code of the control. No need to change the system
  434. > font.
  435.  
  436. Okay, how does one do that without building the DITL on the fly? I read
  437. that you can patch the GetNewControl (or NewControl, depending on what your
  438. computer is doing) and modify that as it goes by, but I haven't been able
  439. to come up with a working patching function (one that just falls-through,
  440. that is).
  441.  
  442. (BTW, IM:MTBE isn't avail to me)
  443.  
  444.  
  445. - ----------------------------------------
  446. "...when friends rejoice both far and near
  447.  How can I keep from singing?" - Enya
  448.  
  449. +++++++++++++++++++++++++++
  450.  
  451. >From Jens Alfke <jens_alfke@powertalk.apple.com>
  452. Date: Wed, 27 Jul 1994 20:16:05 GMT
  453. Organization: Apple Computer
  454.  
  455. Jasna M. Arezina-Wilson, jarezina@magnus.acs.ohio-state.edu writes:
  456. > Okay, how does one do that without building the DITL on the fly?
  457.  
  458. You can use control items -- with associated CNTL resources -- instead of
  459. buttons. Keeping the resources in sync is a bit of a pain, but the CNTL does
  460. let you specify the variation code.
  461.  
  462. --Jens Alfke
  463.   jens_alfke@powertalk              Rebel girl, rebel girl,
  464.             .apple.com              Rebel girl you are the queen of my world
  465.  
  466. +++++++++++++++++++++++++++
  467.  
  468. >From jamesw7955@aol.com (JamesW7955)
  469. Date: 27 Jul 1994 19:49:01 -0400
  470. Organization: America Online, Inc. (1-800-827-6364)
  471.  
  472. In article <CtEC8H.LHp@avalon.chinalake.navy.mil>, Tony Andreoli
  473. <Tony_Andreoli_-_CTA@CL_C21SMTP_GW.CHINALAKE.NAVY.MIL> writes:
  474.  
  475. >> I have a dialog that contains a series of editText and staticText
  476. >>fields,
  477. >>the problem is, I want them to be in Geneva 9!  I understand that
  478. >>SetDAFont will allow me to adjust the font, but how to I set the >>point
  479. >>size (as TextFont and TextSize don't work)?  Think Reference say's
  480. >>there's no "direct" method, but what about an indirect one?
  481.  
  482. Have you looked at the 'ictb' resource? It allows you to specifiy fonts
  483. for items in a DITL (as well as colors and other goodies). It is
  484. documented in IM: Mac toolbox essentials. Beware: it is a tough resource
  485. to build and its structure may leave you scratching your head.
  486.  
  487. - James Wilson
  488. JamesW7955@aol.com
  489.  
  490. ---------------------------
  491.  
  492. >From spohn@mayo.edu (Al Spohn)
  493. Subject: Filtering Edit Text items
  494. Date: 26 Jul 1994 04:01:57 GMT
  495. Organization: Mayo Clinic
  496.  
  497. I've working on a dialog box that takes a time, e.g., 23:12:14.35 as
  498. user input.  The input is organized into four edit text boxes - hours,
  499. minutes, seconds, and hundredths.
  500.  
  501. Before I pose my question, I should let you know that I ordered the
  502. "Text" volume of Inside Macintosh - it just hasn't arrived yet.  So, if
  503. the answer to my question is in-depth and covered in that book, feel
  504. free to blow this off.  However, on the off chance that there's a
  505. relatively quick, easy answer, I'll go ahead and pose the question:
  506.  
  507. What's the best way to restrict the input of each of the text edit
  508. boxes to two digits?  I've played with a few different ideas, but I
  509. continue to be plagued by the funky scrolling that ensues when the user
  510. enters more than two digits.  I don't want to be too much of a nazi in
  511. the way I restrict the input, i.e., I'd prefer to be within sight of
  512. Apple's user interface guidelines.  If I could count on the user tabing
  513. to each field and just replacing highlighted text, things would be
  514. easy.  It's dealing with the insertion point and what happens to the
  515. text as a result that has me stumped.
  516.  
  517. Any suggestions would be appreciated!  
  518.  
  519. **********************************************************************
  520. *  Al Spohn   spohn@mayo.edu  507-284-1666 Mayo Clinic  Hilton 517A  *
  521. **********************************************************************
  522.  
  523. +++++++++++++++++++++++++++
  524.  
  525. >From dougw@astro.as.arizona.edu (Doug Williams)
  526. Date: 26 Jul 1994 14:05:45 GMT
  527. Organization: University of Arizona, Tucson, AZ
  528.  
  529. In article <3121rl$ihg@fermat.mayo.edu> spohn@mayo.edu (Al Spohn) writes:
  530. >What's the best way to restrict the input of each of the text edit
  531. >boxes to two digits?  I've played with a few different ideas, but I
  532. >Any suggestions would be appreciated!  
  533.  
  534.  
  535. Get DialogBits from ftp.apple.com.  It has working source code to
  536. handle exactly what you are asking for (limiting the number of
  537. characters in an edit box), and also show how to limit the input to
  538. only digits.  There are a few mistakes in it (< instead of <=), but
  539. they are pretty obvious.
  540.  
  541. -=-doug-=-
  542.  
  543.  
  544.  
  545. +++++++++++++++++++++++++++
  546.  
  547. >From mark_tillinghast@lamg.com (mark tillinghast)
  548. Date: 26 Jul 1994 07:53:49 -0000
  549. Organization: Los Angeles Macintosh Group BBS
  550.  
  551. Al Spohn,spohn@mayo.edu,Internet writes:
  552. >I've working on a dialog box that takes a time, e.g., 23:12:14.35 as
  553. >user input.  The input is organized into four edit text boxes - hours,
  554. >minutes, seconds, and hundredths.
  555.  
  556.  
  557. >What's the best way to restrict the input of each of the text edit
  558. >boxes to two digits?  I've played with a few different ideas, but I
  559. >continue to be plagued by the funky scrolling that ensues when the user
  560. >enters more than two digits.  I don't want to be too much of a nazi in
  561. >the way I restrict the input, i.e., I'd prefer to be within sight of
  562. >Apple's user interface guidelines.  If I could count on the user tabing
  563. >to each field and just replacing highlighted text, things would be
  564. >easy.  It's dealing with the insertion point and what happens to the
  565. >text as a result that has me stumped.
  566.  
  567.  
  568.  One way is to create a filter-proc for your dialog. That way you can
  569. conviently restrict it to two digits, error trap bad times, (ie 25.61.61.00).
  570. The filterproc essentially gives you first dibs on the Next event. 
  571.   You need somthing more than Inside Macintosh if you are going to use the C
  572. programming language. Inside Macintosh describes things in terms of the
  573. pascal programming language, and the translation to the C programming
  574. language is, in the case of the filterproc, inobvious. 
  575.   It is precisely because Inside Macintosh is in pascal that I recommend
  576. "Macintosh Programming Secrets" by Scott Knaster and Keith Rollins  2nd
  577. Edition Addison Wesley 1992. Chapter 4 of this book deals with dialogs modal
  578. and modeless.
  579.  
  580. I have done this filter proc thing before, but if you want to know what I
  581. think is a slick way to do it, take a look at the alarm clock DA.  If you
  582. make your program behave like the alarm clock DA, I think it will be easy to
  583. use. 
  584.  
  585. Have fun!
  586.  
  587.  
  588. ---------------------------
  589.  
  590. >From jumplong@aol.com (Jump Long)
  591. Subject: MoreFiles 1.2 available on ftp.apple.com
  592. Date: 27 Jul 1994 11:52:08 -0400
  593. Organization: America Online, Inc. (1-800-827-6364)
  594.  
  595. Yesterday I finished MoreFiles 1.2.  I've added lots of new code, and
  596. enhanced several of the existing routines. The change history for version
  597. 1.2 is pasted below.
  598.  
  599. MoreFile 1.2 is available now at:
  600.  
  601.     ftp.apple.com (IP address 130.43.2.3)
  602.  
  603.     /ftp/dts/mac/sc/more-files-1-2.hqx
  604.  
  605. Thanks to all of you who have reported bugs, or suggested enhancements and
  606. additions.
  607.  
  608. - Jim Luther, Apple Developer Technical Support
  609.  
  610. - --------------------------------------
  611. v1.2  07/20/94
  612.  
  613. New Routines:
  614. -  Added GetDInfo, FSpGetDInfo, SetDInfo, FSpSetDInfo, CheckVolLock,
  615. CheckObjectLock, and FSpCheckObjectLock to MoreFilesExtras.
  616. -  Added MoreDesktopMgr. In the process, I moved GetComment, SetComment,
  617. and CopyComment over from MoreFilesExtras and changed their names (added a
  618. DT).  My apologies to anyone this API change screws up. I think the new
  619. and improved code makes up for the hassles.
  620. -  Added Search. Ever want to search a volume with PBCatSearch and it
  621. isn't available? Then you'll like this code.
  622.  
  623. Enhancements to existing routines:
  624. -  Made changes for powerc.
  625. -  THINK C project is for version 7.0.3.
  626. -  Reformatted code to meet new DTS standards for sample code.
  627. -  Added code to FileCopy to open and copy only file forks that contain
  628. data. By doing this, we won't create a data or resource fork for the
  629. copied file unless it's really needed (some foreign file systems such as
  630. the ProDOS File System and Macintosh PC Exchange have to create additional
  631. disk structures to support resource forks).
  632. -  Added code to FileCopy to copy the file attributes to the destination
  633. only if the destination is an AppleShare drop box. That way, if the file
  634. has the bundle bit set and if FileCopy is modified (by you - read the
  635. comments in the source before modification) to give up time to other
  636. processes during a copy, any Finder with access to the file won't try to
  637. read bundle information from a partially copied resource fork.
  638. -  DirectoryCopy no longer calls your CopyErrProc with a copyDirCommentOp
  639. failed operation code. There's really nothing wrong with comments not
  640. getting copied and DirectoryCopy does give it its best effort.
  641. -  Modified OpenAware and OpenRFAware functions to check for locked volume
  642. if write access is requested.
  643. -  Rewrote GetObjectLocation so that it calls PBGetCatInfo fewer times
  644. (worst case is two calls). That makes the code a little harder to read,
  645. but on slow volumes (for example, AppleShare volumes over AppleTalk Remote
  646. Access), fewer calls *is* better.
  647. -  Replaced the static pcpy functions with calls to BlockMoveData (which
  648. is BlockMove if you don't have System Update 3.0, System 7.5, or later).
  649. -  The routines in MoreDesktopMgr (used to be in MoreFilesExtras) can get
  650. APPL mappings, icons, and comments from the "Desktop" file if the Desktop
  651. Manager isn't supported by a volume.
  652. -  NameFileSearch and CreatorTypeFileSearch in MoreFilesExtras now call
  653. PBCatSearchSyncCompat in Search so that they can search on all volumes.
  654. -  Tweaked all headers so that they can be read by a future "documentation
  655. viewer" project.
  656.  
  657. Bugs fixed:
  658. -  Changed DTCopyComment to use Str255 instead of unsigned char
  659. commentBuffer[199]. PhotoCD's wrongly return up to 255 characters instead
  660. of 200 characters and that was trashing memory.
  661. -  Changed FSMakeFSSpecCompat to fix Macintosh PC Exchange 1.0.x bug.
  662. -  Fixed a couple of bugs in GetFilenameFromPathname.
  663. -  Fixed ChangeFDFlags and ChangeCreatorType to get the real vRefNum
  664. before calling BumpDate. BumpDate was "bumping" the wrong object in some
  665. cases.
  666. -  Fixed GetParentID so that it gets the right parent ID in all cases (HFS
  667. has a weird bug that I work around).
  668. -  Cleared ioFVersNum field for all PBHOpenDF, PBHOpenRF, PBHOpen,
  669. PBHCreate, PBHDelete, PBHGetFInfo, PBHSetFInfo, PBHSetFLock, PBHRstFLock,
  670. and PBHRename calls. Not needed for HFS volumes, but some of those old MFS
  671. volumes might still be around.
  672. -  Changed the macro name hasLocalList to hasLocalWList to match bit name
  673. in Files.h.
  674.  
  675. end.
  676.  
  677. ---------------------------
  678.  
  679. >From jcr@mbunix.mitre.org (Rogers)
  680. Subject: Styled Text in Dialogs
  681. Date: 25 Jul 1994 21:44:07 GMT
  682. Organization: The MITRE Corporation, Bedford, MA
  683.  
  684. Can anyone tell me how to change the font, size, and style of
  685. the text for dialog items, including buttons?
  686.  
  687. Thanks,
  688.          Jeff Rogers
  689.          The MITRE Corp.
  690.  
  691.  
  692. +++++++++++++++++++++++++++
  693.  
  694. >From Jens Alfke <jens_alfke@powertalk.apple.com>
  695. Date: Tue, 26 Jul 1994 20:27:41 GMT
  696. Organization: Apple Computer
  697.  
  698. Rogers, jcr@mbunix.mitre.org writes:
  699. > Can anyone tell me how to change the font, size, and style of
  700. > the text for dialog items, including buttons?
  701.  
  702. You can change the text style of static and edit-text items by changing the
  703. style of the grafPort (via TextFont, TextSize, TextFace). You also need to
  704. update the txFont, txSize, txFace fields of the dialog's TE record, then call
  705. TECalText. Don't forget to SetPort to the dialog first. It looks better if
  706. you turn off the isVisible flag in the DLOG resource, then manually call
  707. ShowWindow after making your changes.
  708.  
  709. Changing the style of buttons is harder. If you create the button yourself
  710. using NewControl, you can OR the variation code with 8 (useWFont) which will
  711. make the title of the button appear in the grafPort's current font.
  712. Unfortunately control items in dialogs are created for you by the dlog mgr
  713. and there is no way to change their var code once created.
  714. The two ways I know of to get around this are:
  715. (A) make all your buttons be control items, not buttons, then set the
  716. variation code in the CNTL resource
  717. (B) Temporarily patch out GetNewControl during the call to GetNewDialog. In
  718. the patch, OR the varCode with useWFont and call through to the old trap.
  719. (This is what I do in Stickies and it works great.)
  720.  
  721. --Jens Alfke
  722.   jens_alfke@powertalk              Rebel girl, rebel girl,
  723.             .apple.com              Rebel girl you are the queen of my world
  724.  
  725. +++++++++++++++++++++++++++
  726.  
  727. >From jarezina@magnus.acs.ohio-state.edu (Jasna M. Arezina-Wilson)
  728. Date: 27 Jul 1994 11:14:49 GMT
  729. Organization: Ohio State University
  730.  
  731. In article <1994Jul26.202741.20971@gallant.apple.com>, Jens Alfke
  732. <jens_alfke@powertalk.apple.com> wrote:
  733.  
  734.  
  735. > (B) Temporarily patch out GetNewControl during the call to GetNewDialog. In
  736. > the patch, OR the varCode with useWFont and call through to the old trap.
  737. > (This is what I do in Stickies and it works great.)
  738.  
  739. Are you this this is right? I tried it, and GetNewControl is not called -
  740. NewControl is. (at least on my SE & sys7.0) Could you post your code
  741. fragment here or to alt.sources.mac?
  742.  
  743. - ----------------------------------------
  744. "...when friends rejoice both far and near
  745.  How can I keep from singing?" - Enya
  746.  
  747. +++++++++++++++++++++++++++
  748.  
  749. >From Jens Alfke <jens_alfke@powertalk.apple.com>
  750. Date: Wed, 27 Jul 1994 20:08:54 GMT
  751. Organization: Apple Computer
  752.  
  753. Jasna M. Arezina-Wilson, jarezina@magnus.acs.ohio-state.edu writes:
  754. > Are you this this is right? I tried it, and GetNewControl is not called -
  755. > NewControl is. (at least on my SE & sys7.0)
  756.  
  757. Oops, you're right. It's NewControl you need to patch.
  758.  
  759. > Could you post your code
  760. > fragment here or to alt.sources.mac?
  761.  
  762. Unfortunately the code I have that does this is part of Stickies, and Apple
  763. wouldn't want me to redistribute the source. I should probably snip out just
  764. the essentials and give them to DTS as an official Snippet...
  765.  
  766. --Jens Alfke
  767.   jens_alfke@powertalk              Rebel girl, rebel girl,
  768.             .apple.com              Rebel girl you are the queen of my world
  769.  
  770. ---------------------------
  771.  
  772. >From quasar@ctt.bellcore.com (Laurence R. Brothers)
  773. Subject: The shock of the new (mac vs unix)
  774. Date: Thu, 21 Jul 1994 17:27:17 GMT
  775. Organization: Bellcore
  776.  
  777.  
  778. I don't intend to start a flame war about relative merits of things
  779. with this article, but I must say that as a programmer familiar with a
  780. variety of unix gui toolkits, ranging (historically) from Sunview all
  781. the way through TCL/TK, that my introduction to the Mac environment
  782. was rather a shock.
  783.  
  784. Keep in mind I'm used to an environment where you just don't have to
  785. worry about managing and dispatching your own events, and even
  786. updating windows will often be magically taken care of for you.  Most
  787. unix GUI toolkit objects either have useable default behavior, or you
  788. simply register callbacks for them. You never have to mess with the
  789. event loop in a typical X application unless you're doing something
  790. really weird and/or low-level. In fact if you use TCL/TK (that's a
  791. different TCL than the Mac acronym, by the way), almost every little
  792. thing is taken care of with amazingly acceptable default behaviour in
  793. the toolkit library.
  794.  
  795. A list of amazements as I started trying to develop some simple test
  796. applications to learn the Mac development environment:
  797.  
  798. * What, I have to write my own event loop? Haven't they heard of
  799. callbacks?  Interposition? Well, I guess it's not a pre-emptive OS,
  800. but still, does that make any difference?
  801.  
  802. * I have to manage operating system events myself? What's the point of
  803. having an operating system if it can't manage its own events?
  804.  
  805. * I have to write an event procedure in case someone inserts an
  806. unformatted disk? Give me a break. How about I request a notification
  807. only if I'm interested in a bad disk event, and otherwise you take
  808. care of it, Mr. Disk Manager? No deal? Too bad.
  809.  
  810. * OK, first I see the event is in the menu bar, then I adjust the
  811. menus to show what is active, then I call the menu tracking procedure,
  812. then I divide a long int into two "words" (gee, 16 bit words, I wonder
  813. where that came from -- me, I call it a half-word.... :-), then I find
  814. out which menu and item it was, then I get to actually have my own
  815. code do something after checking the global state of the program.  How
  816. baroque.
  817.  
  818. * Wait a minute, this isn't a scrollbar, it's just a bit of graphics.
  819. It doesn't actually *do* anything. It takes a page of code just to get
  820. to the point that you find out which scrollbar thingie got clicked on,
  821. then you have to do it all yourself. Apple wouldn't have to have all
  822. this style guide stuff if they actually implemented any functionality
  823. anywhere.
  824.  
  825. * Hmm... I guess the zoom box and the grow icon don't do anything
  826. either. Well, gee, at least I have system zoom and grow procedures,
  827. but my event procedure needs at least a page of checks surrounding
  828. each one before I can call it. Same thing for window movement.
  829.  
  830. * Hey wait a second, you mean I actually have to activate and
  831. deactivate the windows myself? I have to deselect the controls, and
  832. all that? Oh come on....
  833.  
  834. * I guess geometry management is too much to ask for? Oh well. Should
  835. have known better than to ask. Of course there are no subwindows on
  836. the Mac anyhow, so I guess there's not much point.
  837.  
  838. * Oh well, at least the update event is the same. What, you say I
  839. shouldn't use backing store? Why not? Why provide the feature and then
  840. say not to use it?
  841.  
  842.                 ...
  843.  
  844.  
  845. Well, you can see what I mean, if you have any familiarity with your
  846. typical Unix/X toolkit (which I had previously thought of as the
  847. pessimal programming environment!)
  848.  
  849. I have to qualify all this by saying I've only been messing around
  850. with Mac programming for a few weeks, so I am not used to it all yet,
  851. but still.... I would have thought the basic programming paradigm
  852. might have advanced slightly in the last 10 years, at least to the
  853. extent of a standard re-entrant toolkit event-loop with callbacks and
  854. event interposition instead of all this manual dispatching. Even in an
  855. antique like Sunview you could code a typical application in probably
  856. 1/5 to 1/2 the space of an equivalent Mac application. 
  857.  
  858. It must take at least 500 lines of C to produce a Mac application that
  859. is minimally conformant to the general rules of application behavior,
  860. probably more. IMHO, even a 3 line hello world program should
  861. automagically do all "the right things" because the windowing
  862. environment/finder/OS/whatever should take care of it all.
  863.  
  864. I also must admit that I have only been using MPW C, not MacApp or any
  865. of the C++ stuff as yet. I imagine that every Mac programmer must use
  866. some standard application framework to build their programs after a
  867. while, be it MacApp, AppWannaBe, or whatever, but still, the whole
  868. thing seems a lot more awkward than it really needs to be.
  869.  
  870. Of course all the above is IMHO only.... Of course there are many
  871. things available on the Mac platform that are either real expensive or
  872. very hard to implement in the typical unix environment. Still, I would
  873. really like someone to tell me: "You obviously haven't used the foo
  874. class libraries with the bar uims package and the baz event manager
  875. yet, so what do you expect".
  876. --
  877.              Laurence R. Brothers (quasar@bellcore.com)
  878.   Bellcore -- Computing Technology Integration -- Knowledge-Based Applications
  879.        "There is no memory with less satisfaction in it than the memory
  880.             of some temptation we resisted." -- James Branch Cabell
  881.  
  882.  
  883. +++++++++++++++++++++++++++
  884.  
  885. >From Jens Alfke <jens_alfke@powertalk.apple.com>
  886. Date: Thu, 21 Jul 1994 20:57:20 GMT
  887. Organization: Apple Computer
  888.  
  889. Laurence R. Brothers, quasar@ctt.bellcore.com writes:
  890. > Keep in mind I'm used to an environment where you just don't have to
  891. > worry about managing and dispatching your own events, and even
  892. > updating windows will often be magically taken care of for you.  Most
  893. > unix GUI toolkit objects either have useable default behavior, or you
  894. > simply register callbacks for them. You never have to mess with the
  895. > event loop in a typical X application unless you're doing something
  896. > really weird and/or low-level. In fact if you use TCL/TK (that's a
  897. > different TCL than the Mac acronym, by the way), almost every little
  898. > thing is taken care of with amazingly acceptable default behaviour in
  899. > the toolkit library.
  900.  
  901. You really need to start using one of the frameworks -- MacApp, TCL or
  902. PowerPlant. They implement most of the nice things you describe above.
  903.  
  904. Keep in mind the historical legacy of the Mac: that it was built in the
  905. early-'80s on a slow CPU with 128k of RAM (and originally it was only
  906. supposed to have 64k.) There wasn't enough RAM or oomph to use object
  907. oriented languages, and C++ didn't exist anyway. Nor was there enough memory,
  908. or development time, to provide sophisticated libraries to do the work for
  909. you. The goal of the Toolbox was to provide the facilities you'd need to put
  910. together a Mac-style application, not to make it as easy as possible.
  911.  
  912. Unfortunately, it's never been possible to move away from that, since it
  913. would have meant breaking every existing application. What _has_ been done is
  914. to layer more sophisticated environments on top of the Toolbox, such as the
  915. class libraries I mentioned above. I think you'll find those much more to
  916. your taste.
  917.  
  918. --Jens Alfke
  919.   jens_alfke@powertalk              Rebel girl, rebel girl,
  920.             .apple.com              Rebel girl you are the queen of my world
  921.  
  922. +++++++++++++++++++++++++++
  923.  
  924. >From todd@fred.dfrf.nasa.gov (Todd Vernon)
  925. Date: Thu, 21 Jul 1994 21:14:01 GMT
  926. Organization: NASA
  927.  
  928. --
  929. > I don't intend to start a flame war about relative merits of things
  930. > with this article, but I must say that as a programmer familiar with a
  931. > variety of unix gui toolkits, ranging (historically) from Sunview all
  932. > the way through TCL/TK, that my introduction to the Mac environment
  933. > was rather a shock.
  934.  
  935. Hold on there sport.  I come from the same direction as
  936. you but I have a little different perspective.
  937.  
  938. First of all.  You are comparing the Mac Toolbox to a 
  939. high level lib like Motif or TCL/TK ?  Try XLib.
  940.  
  941. Xlib is only moderatly better in a side by side comparison
  942. then the MacToolbox.  Think of the Mac Toolbox as Xlib with
  943. controls.  And yes they really are controls, you didn't have
  944. to "draw" the button did you ? 
  945.  
  946. If you choose to use the toolbox alone that is your biz, but I
  947. would suggest something a little better, at least initially.
  948. I use TranSkel and think it is really quite nice, and yes it
  949. has the callbacks that are familiar to you.  
  950.  
  951. Pay a little respect to the Mac roots, it was the first wide
  952. spread use of GUI stuff.  It carries a little baggage.
  953.  
  954. As for MPW, well you made that choice, nothing can help you
  955. there.  (try Code Warrior).
  956.  
  957.  
  958.  
  959. - ----------------------------------------------------------
  960.   Todd Vernon                                    |\/\/\/|
  961.   PRC Inc.                                       |      |
  962.   NASA Dryden Flight Research Facility           |      |
  963.   Edwards, CA 93523                              | (o)(o)
  964.                                                  @      _)
  965.                                                   | ,___|
  966.   Phone: 805 258 2106                             |   /
  967.   FAX  : 805 258 2792                            /____\
  968.   Email: todd@fred.dfrf.nasa.gov                /      \
  969. - ----------------------------------------------------------
  970.  
  971. +++++++++++++++++++++++++++
  972.  
  973. >From rmah@panix.com (Robert Mah)
  974. Date: Thu, 21 Jul 1994 17:29:43 -0500
  975. Organization: One Step Beyond
  976.  
  977. quasar@ctt.bellcore.com (Laurence R. Brothers) wrote:
  978.  
  979. ) I don't intend to start a flame war about relative merits of things
  980. ) with this article, but I must say that as a programmer familiar with a
  981. ) variety of unix gui toolkits, ranging (historically) from Sunview all
  982. ) the way through TCL/TK, that my introduction to the Mac environment
  983. ) was rather a shock.
  984. ) [...]
  985. ) It must take at least 500 lines of C to produce a Mac application that
  986. ) is minimally conformant to the general rules of application behavior,
  987. ) [...]
  988. ) I also must admit that I have only been using MPW C, not MacApp or any
  989. ) of the C++ stuff as yet. I imagine that every Mac programmer must use
  990. ) some standard application framework to build their programs after a
  991. ) while, be it MacApp, AppWannaBe, or whatever, but still, the whole
  992. ) thing seems a lot more awkward than it really needs to be.
  993.  
  994. Gack.  You're using the most primative (interface wise) programming
  995. environment and language on the Mac and programming to the metal (well 
  996. the raw OS anyway) and compare that against sophisticated X toolkits
  997. for UNIX????
  998.  
  999. As you implied, if you should compare your X experience vs MacApp or TCL 
  1000. or PowerPlant or Galaxy or XVT or...
  1001.  
  1002. If you weren't the kind of guy who did raw X programming, why do you
  1003. want to do raw Mac programming?  There are plenty of higher level tools
  1004. to choose from.  Go choose one.  Or build one, as it seems you are in
  1005. the process of doing :-).
  1006.  
  1007. In addition, remember that the Mac is a _personal_ computer, not a work-
  1008. station.  As such, it generally runs with much slimmer resources than
  1009. workstations.  32MB's of RAM is not common.  Only around 65% of Mac users
  1010. even have color.  Hell, a good 20% or 30% still use System 6 on 2MB or 
  1011. less.
  1012.  
  1013. P.S. I would put the minimal LOC in C at a few thousand for a useless,
  1014.      but fully conformant Mac application.
  1015.  
  1016.  
  1017. That said, just for kicks, I'll try to explain some of the reasons the 
  1018. Mac is the way it is.
  1019.  
  1020. ) * What, I have to write my own event loop? Haven't they heard of
  1021. ) callbacks?  Interposition? Well, I guess it's not a pre-emptive OS,
  1022.  
  1023. The original Mac was designed in '82/83 and was a single tasking machine.
  1024. When it came out, it had the most sophisticated and rich API of any
  1025. machine of its class available at the time.
  1026.  
  1027. In addition, in a cooperative environment, IMO, you need fine control
  1028. over event handling to be nice-nice with other apps.
  1029.  
  1030.  
  1031. ) * I have to manage operating system events myself? What's the point of
  1032. ) having an operating system if it can't manage its own events?
  1033.  
  1034. It does.  It simply notifies you when things happen.  Would you rather
  1035. it didn't?
  1036.  
  1037.  
  1038. ) * OK, first I see the event is in the menu bar, then I adjust the
  1039. ) menus to show what is active, then I call the menu tracking procedure,
  1040. ) [...]
  1041. ) something after checking the global state of the program.  How baroque.
  1042.  
  1043. If you only want simple menu selections, yes.  Some folks have to do more
  1044. complex things like tear-off menus that turn into floating palettes.
  1045.  
  1046. Same with scroll bars and other interface elements.
  1047.  
  1048.  
  1049. ) * Oh well, at least the update event is the same. What, you say I
  1050. ) shouldn't use backing store? Why not? Why provide the feature and then
  1051. ) say not to use it?
  1052.  
  1053. The PicHandle thing for windows IS NOT a backing store.  You shouldn't 
  1054. use a backing store because the average Mac today has only 4MB to 8MB
  1055. of real RAM.  That's not enough for backing stores.  The original had
  1056. only 128K of RAM.
  1057.  
  1058.  
  1059. ) but still.... I would have thought the basic programming paradigm
  1060. ) might have advanced slightly in the last 10 years, at least to the
  1061. ) [...]
  1062.  
  1063. Nope.  There's this little thing called backward compatability that's
  1064. extremely important in the personal computer world.  UNIX people are
  1065. generally technical enough to roll with the punches, but secretaries,
  1066. artists and office workers would balk.
  1067.  
  1068. Apple is, of course, working on a pre-emptive kernal and memory protection
  1069. and all that other stuff.  But we gotta wait.  When they do come, the
  1070. days of free-form hacking and wild system patches will be gone.  Maybe
  1071. that's good, maybe that's bad...to each his own.
  1072.  
  1073. Well, that's enough for now.
  1074.  
  1075. Cheers,
  1076. Rob
  1077. _____________________________________________________________________
  1078. Robert S. Mah           Software Development          +1.212.947.6507
  1079. One Step Beyond        and Network Consulting          rmah@panix.com
  1080.  
  1081. +++++++++++++++++++++++++++
  1082.  
  1083. >From afcjlloyd@aol.com (AFC JLloyd)
  1084. Date: 21 Jul 1994 17:32:05 -0400
  1085. Organization: America Online, Inc. (1-800-827-6364)
  1086.  
  1087. In article <QUASAR.94Jul21132717@shadowgard.ctt.bellcore.com>,
  1088. quasar@ctt.bellcore.com (Laurence R. Brothers) writes:
  1089.  
  1090. >I don't intend to start a flame war about relative merits of things
  1091. >with this article, but I must say that as a programmer familiar with a
  1092. >variety of unix gui toolkits, ranging (historically) from Sunview all
  1093. >the way through TCL/TK, that my introduction to the Mac environment
  1094. >was rather a shock.
  1095. >
  1096. > [ some interesting stuff omitted]
  1097. >
  1098. >I also must admit that I have only been using MPW C, not MacApp or any
  1099. >of the C++ stuff as yet. I imagine that every Mac programmer must use
  1100. >some standard application framework to build their programs after a
  1101. >while, be it MacApp, AppWannaBe, or whatever, but still, the whole
  1102. >thing seems a lot more awkward than it really needs to be.
  1103. >
  1104. >Of course all the above is IMHO only.... Of course there are many
  1105. >things available on the Mac platform that are either real expensive or
  1106. >very hard to implement in the typical unix environment. Still, I would
  1107. >really like someone to tell me: "You obviously haven't used the foo
  1108. >class libraries with the bar uims package and the baz event manager
  1109. >yet, so what do you expect".
  1110.  
  1111. Yes, you've got it right, even down to your suspicion that application
  1112. framework libraries like MacApp are what you are missing.  At one time
  1113. Apple hinted that a framework like MacApp might make it into ROM, but that
  1114. idea seems to have been abandoned, which in my opinion is just as well.  I
  1115. worked on Bedrock for two years, which was to be a next generation
  1116. framework (and may still become one in its reincarnation as the OpenDoc
  1117. Parts Framework).  My experiences tell me that we still have more to learn
  1118. about the right way to create application frameworks; putting one into ROM
  1119. at this point seems like a bad idea.
  1120.  
  1121. All of the established frameworks address many of the points you raise,
  1122. but none are without flaws.  So, you should survey the established
  1123. frameworks, pick one, and then be prepared to enter a love/hate
  1124. relationship with it.
  1125.  
  1126. Jim Lloyd
  1127. afcjlloyd@aol.com
  1128.  
  1129.  
  1130. +++++++++++++++++++++++++++
  1131.  
  1132. >From Bill North <north@spso.gsfc.nasa.gov>
  1133. Date: 21 Jul 1994 22:36:35 GMT
  1134. Organization: NASA Goddard Space Flight Center -- InterNetNews site
  1135.  
  1136. In article <QUASAR.94Jul21132717@shadowgard.ctt.bellcore.com>
  1137. Laurence R. Brothers, quasar@ctt.bellcore.com writes:
  1138. >
  1139. >A list of amazements as I started trying to develop some simple test
  1140. >applications to learn the Mac development environment:
  1141. >
  1142.  
  1143. Clearly, what you really want is to work on the Apple IIgs. :)
  1144. Much more advanced than the Mac. ;-)
  1145.  
  1146. Most of those things exist in the Apple IIgs toolbox. I never
  1147. understood why Apple never added the equivalent of IIgs calls
  1148. to the Mac, when the same company developed both toolboxes.
  1149.  
  1150. Why can't Apple add TaskMaster to the Mac? (TaskMaster handles
  1151. all "typical" system events: Window moving, scrolling, resizing,
  1152. etc; Menu selecting, highlighting, blinking, etc; Desk accessory
  1153. handling; Control activation, highlighting, etc.)
  1154.  
  1155. How about "HandleDiskInsert" on the IIgs, which will handle all
  1156. disk insert activities, including formatting.
  1157.  
  1158. Could go on, but...
  1159.  
  1160. Apple should apply the lessons learned from the IIgs and apply
  1161. them to the Mac.
  1162.  
  1163. /*  Bill North -- north@spso.gsfc.nasa.gov  */
  1164.  
  1165. +++++++++++++++++++++++++++
  1166.  
  1167. >From stuart@lorelei.ece.drexel.edu (Stuart R. Harper)
  1168. Date: Thu, 21 Jul 1994 18:52:34 -0400
  1169. Organization: Drexel U.
  1170.  
  1171. In article <1994Jul21.205720.2022@gallant.apple.com>, Jens Alfke
  1172. <jens_alfke@powertalk.apple.com> wrote:
  1173.  
  1174. > Laurence R. Brothers, quasar@ctt.bellcore.com writes:
  1175. > > Keep in mind I'm used to an environment where you just don't have to
  1176. > > worry about managing and dispatching your own events, and even
  1177. > > updating windows will often be magically taken care of for you.  Most
  1178. > > unix GUI toolkit objects either have useable default behavior, or you
  1179. > > simply register callbacks for them. You never have to mess with the
  1180. > > event loop in a typical X application unless you're doing something
  1181. > > really weird and/or low-level. In fact if you use TCL/TK (that's a
  1182. > > different TCL than the Mac acronym, by the way), almost every little
  1183. > > thing is taken care of with amazingly acceptable default behaviour in
  1184. > > the toolkit library.
  1185. > You really need to start using one of the frameworks -- MacApp, TCL or
  1186. > PowerPlant. They implement most of the nice things you describe above.
  1187. > Keep in mind the historical legacy of the Mac: that it was built in the
  1188. > early-'80s on a slow CPU with 128k of RAM (and originally it was only
  1189. > supposed to have 64k.) There wasn't enough RAM or oomph to use object
  1190. > oriented languages, and C++ didn't exist anyway. Nor was there enough memory,
  1191. > or development time, to provide sophisticated libraries to do the work for
  1192. > you. The goal of the Toolbox was to provide the facilities you'd need to put
  1193. > together a Mac-style application, not to make it as easy as possible.
  1194.  
  1195. That was an EXTREME cop-out. Reading Mr. Brothers list of complaints
  1196. reminded me of my own annoyance with programming the mac after moving over
  1197. from the Amiga, a 256K RAM/ROM, 68K based system. At the time of my change
  1198. ('90), I couldn't believe that Apple provided an impressive guideline on
  1199. 'how' the Mac should look and function without providing default actions
  1200. from system required user-interface features. Window management and
  1201. user-input code that took 3 or 4 lines to control suddenly took pages.
  1202.  
  1203. Requiring the development environment to push basic features invites all
  1204. kinds of compatibilty problems between systems, increases development time
  1205. with wasted compilation of 'standard' actions and increases the overall
  1206. code 'bloat'. Add that to the normal OOPS bloat and you've created
  1207. multi-megabyte monsters that require '040s and 601 just to grow the
  1208. window. :)
  1209.  
  1210. -- 
  1211. Stuart R. Harper - E4 Lab Technician - LeBow 132 - CCD - Drexel U.
  1212. stuart@lorelei.ece.drexel.edu        harper@e4mail.ece.drexel.edu
  1213.  
  1214. +++++++++++++++++++++++++++
  1215.  
  1216. >From aclaasse@nyx.cs.du.edu (Arne Claassen)
  1217. Date: 21 Jul 1994 20:16:47 -0600
  1218. Organization: /usr/lib/news/organi[sz]ation
  1219.  
  1220. In article <1994Jul21.205720.2022@gallant.apple.com>,
  1221. Jens Alfke  <jens_alfke@powertalk.apple.com> wrote:
  1222. >You really need to start using one of the frameworks -- MacApp, TCL or
  1223. >PowerPlant. They implement most of the nice things you describe above.
  1224. >
  1225.  
  1226. Being a Newbie to CodeWarrior and Macintosh C programming i felt a lot like
  1227. Lawrence. I looked at Powerplant and then decided to dig into the user manual
  1228. which explained to me that if i didn't have a good working knowledge of
  1229. the Toolbox and other such things, i should not bother with Powerplant yet.
  1230. So i'm going through Macintosh C primer and anything i can find and find myself
  1231. programming Event loops and stuff like that and never even getting to an 
  1232. actual program aside from handling the basic interface. 
  1233.  
  1234. I'm looking for something that let's me design the interface in a manner
  1235. similar to Visual C or similar and be able to concentrate on writing the code
  1236. that operates within the interface framework. Is this what Powerplant (or
  1237. MacApp, or whatever) does and how do i get started with it?
  1238.  
  1239. Thanks,
  1240.  
  1241. Arne F. Claassen
  1242. claassen@ebs330.eb.uah.edu
  1243. aclaasse@nyx.cs.du.edu
  1244.  
  1245.  
  1246. +++++++++++++++++++++++++++
  1247.  
  1248. >From thundero@news.delphi.com (THUNDERONE@DELPHI.COM)
  1249. Date: 22 Jul 1994 03:32:51 -0000
  1250. Organization: Delphi Internet Services Corporation
  1251.  
  1252. quasar@ctt.bellcore.com (Laurence R. Brothers) writes:
  1253.  
  1254.  
  1255. >I don't intend to start a flame war about relative merits of things
  1256. >with this article, but I must say that as a programmer familiar with a
  1257. >variety of unix gui toolkits, ranging (historically) from Sunview all
  1258. >the way through TCL/TK, that my introduction to the Mac environment
  1259. >was rather a shock.
  1260.  
  1261. >Keep in mind I'm used to an environment where you just don't have to
  1262. >worry about managing and dispatching your own events, and even
  1263. >updating windows will often be magically taken care of for you.  Most
  1264. >unix GUI toolkit objects either have useable default behavior, or you
  1265. >simply register callbacks for them. You never have to mess with the
  1266. >event loop in a typical X application unless you're doing something
  1267. >really weird and/or low-level. In fact if you use TCL/TK (that's a
  1268. >different TCL than the Mac acronym, by the way), almost every little
  1269. >thing is taken care of with amazingly acceptable default behaviour in
  1270. >the toolkit library.
  1271.  
  1272. John Ousterhout's new group at Sun is apparently working on a Mac 
  1273. port of Tk.  There's already an "unofficial" port of Tcl.
  1274.  
  1275. >A list of amazements as I started trying to develop some simple test
  1276. >applications to learn the Mac development environment:
  1277.  
  1278. >* What, I have to write my own event loop? Haven't they heard of
  1279. >callbacks?  Interposition? Well, I guess it's not a pre-emptive OS,
  1280. >but still, does that make any difference?
  1281.  
  1282. You're trying not to start a flame war?  "I ask merely for 
  1283. information."
  1284.  
  1285. >* I have to manage operating system events myself? What's the point of
  1286. >having an operating system if it can't manage its own events?
  1287.  
  1288. Hey, go check out Windows before you complain about Macintosh's 
  1289. handling of events.
  1290.  
  1291. >* I have to write an event procedure in case someone inserts an
  1292. >unformatted disk? Give me a break. How about I request a notification
  1293. >only if I'm interested in a bad disk event, and otherwise you take
  1294. >care of it, Mr. Disk Manager? No deal? Too bad.
  1295.  
  1296. >* OK, first I see the event is in the menu bar, then I adjust the
  1297. >menus to show what is active, then I call the menu tracking procedure,
  1298. >then I divide a long int into two "words" (gee, 16 bit words, I wonder
  1299. >where that came from -- me, I call it a half-word.... :-), then I find
  1300. >out which menu and item it was, then I get to actually have my own
  1301. >code do something after checking the global state of the program.  How
  1302. >baroque.
  1303.  
  1304. >* Wait a minute, this isn't a scrollbar, it's just a bit of graphics.
  1305. >It doesn't actually *do* anything. It takes a page of code just to get
  1306. >to the point that you find out which scrollbar thingie got clicked on,
  1307. >then you have to do it all yourself. Apple wouldn't have to have all
  1308. >this style guide stuff if they actually implemented any functionality
  1309. >anywhere.
  1310.  
  1311. >* Hmm... I guess the zoom box and the grow icon don't do anything
  1312. >either. Well, gee, at least I have system zoom and grow procedures,
  1313. >but my event procedure needs at least a page of checks surrounding
  1314. >each one before I can call it. Same thing for window movement.
  1315.  
  1316. >* Hey wait a second, you mean I actually have to activate and
  1317. >deactivate the windows myself? I have to deselect the controls, and
  1318. >all that? Oh come on....
  1319.  
  1320. >* I guess geometry management is too much to ask for? Oh well. Should
  1321. >have known better than to ask. Of course there are no subwindows on
  1322. >the Mac anyhow, so I guess there's not much point.
  1323.  
  1324. You think subwindows are a good thing? I can see why they would be 
  1325. used in X and all those other GUIs, but the Mac has a Human Interface.  
  1326. They really wouldn't fit.
  1327.  
  1328. >* Oh well, at least the update event is the same. What, you say I
  1329. >shouldn't use backing store? Why not? Why provide the feature and then
  1330. >say not to use it?
  1331.  
  1332. >                ...
  1333.  
  1334.  
  1335. >Well, you can see what I mean, if you have any familiarity with your
  1336. >typical Unix/X toolkit (which I had previously thought of as the
  1337. >pessimal programming environment!)
  1338.  
  1339. >I have to qualify all this by saying I've only been messing around
  1340. >with Mac programming for a few weeks, so I am not used to it all yet,
  1341. >but still.... I would have thought the basic programming paradigm
  1342. >might have advanced slightly in the last 10 years, at least to the
  1343. >extent of a standard re-entrant toolkit event-loop with callbacks and
  1344. >event interposition instead of all this manual dispatching. Even in an
  1345. >antique like Sunview you could code a typical application in probably
  1346. >1/5 to 1/2 the space of an equivalent Mac application. 
  1347.  
  1348. Unlike Sunview, X, Motif, etc, Macintosh has a considerably large 
  1349. installed base.  The people forming the installed base would be rather 
  1350. upset if all the applications they use suddenly broke overnight.
  1351.  
  1352. [snip]
  1353.  
  1354. >Of course all the above is IMHO only.... Of course there are many
  1355. >things available on the Mac platform that are either real expensive or
  1356. >very hard to implement in the typical unix environment. Still, I would
  1357. >really like someone to tell me: "You obviously haven't used the foo
  1358. >class libraries with the bar uims package and the baz event manager
  1359. >yet, so what do you expect".
  1360.  
  1361. You haven't tried the PowerPlant class library, which is included with 
  1362. CodeWarrior, so what do you expect?
  1363.  
  1364. >--
  1365. >             Laurence R. Brothers (quasar@bellcore.com)
  1366. >  Bellcore -- Computing Technology Integration -- Knowledge-Based Applications
  1367. >       "There is no memory with less satisfaction in it than the memory
  1368. >            of some temptation we resisted." -- James Branch Cabell
  1369.  
  1370. ......................................................................
  1371. Chris Thomas, Programmer, Echo Software, thunderone@delphi.com
  1372.  
  1373. +++++++++++++++++++++++++++
  1374.  
  1375. >From eascharf@u.washington.edu (Elizabeth Scharf)
  1376. Date: 22 Jul 1994 04:36:32 GMT
  1377. Organization: University of Washington, Seattle
  1378.  
  1379. This reminds me of Jerry Pournelle's infamous quote in 1984 to the effect
  1380. that the problem with the Macintosh was that "they wrote half of the
  1381. operating system and left the other half as an exercise to the reader." 
  1382.  
  1383. Fortunately, things have progressed a little since then...
  1384.  
  1385. rmgw
  1386.  
  1387. This is not my account:  Please address replies to hawkfish@aol.com
  1388.  
  1389. Disclaimer:  All views expressed are entirely my own and do not reflect 
  1390. the opinions of Elizabeth Scharf or the University of Washington.
  1391.  
  1392. - ---------------------------------------------------------------------------
  1393. Richard Wesley             | "If I can't dance, you can keep your
  1394. hawkfish@aol.com           |  revolution."
  1395. 71062.1711@compuserve.com  |        - Emma Goldman
  1396. - ---------------------------------------------------------------------------
  1397.  
  1398.  
  1399. +++++++++++++++++++++++++++
  1400.  
  1401. >From tbrown@magnus.acs.ohio-state.edu (Ted C Brown)
  1402. Date: 22 Jul 1994 05:33:23 GMT
  1403. Organization: The Ohio State University
  1404.  
  1405. In article <30mpgl$e40@search01.news.aol.com>,
  1406.  
  1407. >Yes, you've got it right, even down to your suspicion that application
  1408. >framework libraries like MacApp are what you are missing.  At one time
  1409. >Apple hinted that a framework like MacApp might make it into ROM, but that
  1410. >idea seems to have been abandoned, which in my opinion is just as well.  I
  1411. >worked on Bedrock for two years, which was to be a next generation
  1412. >framework (and may still become one in its reincarnation as the OpenDoc
  1413. >Parts Framework).  My experiences tell me that we still have more to learn
  1414. >about the right way to create application frameworks; putting one into ROM
  1415. >at this point seems like a bad idea.
  1416.  
  1417. I don't really want the app frameworks in ROM, I want the base classes to
  1418. exist in one place in memory, probably loaded by an extention, and for
  1419. programs to dynamically link to them.  The main problem with this is
  1420. that we'd have to settle on one app framework.  Well maybe not --
  1421. having the PowerPlant/MacApp/TCL load all at once would eat up alot
  1422. of memory, but dramatically reduce the code/memory needs of every program
  1423. that used them.
  1424.  
  1425. Maybe Dylan will do this (you'd think it'd be able to handle the Dynamic
  1426. Linking part).
  1427.  
  1428.  
  1429. +++++++++++++++++++++++++++
  1430.  
  1431. >From mburch@ksu.ksu.edu (Matt Burch)
  1432. Date: 21 Jul 1994 20:24:36 -0500
  1433. Organization: Kansas State University
  1434.  
  1435. For most of the stuff you mentioned, I use the freeware
  1436. TransSkel 3.0. It does all the event handling, menus, windows, etc.
  1437. and calls my callback routines when something relavent happens.
  1438. Easy as 3.1415927.
  1439.  
  1440. -- 
  1441. - -------------------------------------------------------
  1442. Matt Burch | mburch@ksu.ksu.edu | Cogito, ergo cogito sum  
  1443. - -------------------------------------------------------
  1444.  
  1445. +++++++++++++++++++++++++++
  1446.  
  1447. >From xperts@infi.net (Russell LaVelle)
  1448. Date: 22 Jul 1994 14:27:16 GMT
  1449. Organization: InfiNet
  1450.  
  1451. Ted C Brown (tbrown@magnus.acs.ohio-state.edu) wrote:
  1452. : In article <30mpgl$e40@search01.news.aol.com>,
  1453.  
  1454. : >Yes, you've got it right, even down to your suspicion that application
  1455. : >framework libraries like MacApp are what you are missing.  At one time
  1456. : >Apple hinted that a framework like MacApp might make it into ROM, but that
  1457. : >idea seems to have been abandoned, which in my opinion is just as well.  I
  1458. : >worked on Bedrock for two years, which was to be a next generation
  1459. : >framework (and may still become one in its reincarnation as the OpenDoc
  1460. : >Parts Framework).  My experiences tell me that we still have more to learn
  1461. : >about the right way to create application frameworks; putting one into ROM
  1462. : >at this point seems like a bad idea.
  1463.  
  1464. : I don't really want the app frameworks in ROM, I want the base classes to
  1465. : exist in one place in memory, probably loaded by an extention, and for
  1466. : programs to dynamically link to them.  The main problem with this is
  1467. : that we'd have to settle on one app framework.  Well maybe not --
  1468. : having the PowerPlant/MacApp/TCL load all at once would eat up alot
  1469. : of memory, but dramatically reduce the code/memory needs of every program
  1470. : that used them.
  1471.  
  1472. You want a Shared Library, which is possible in the PPC. 
  1473.  
  1474. : Maybe Dylan will do this (you'd think it'd be able to handle the Dynamic
  1475. : Linking part).
  1476.  
  1477. Thats axactly waht Dylan does. There is a Dylan Core that goes in the
  1478. extensions folder. Also, the developer can choose to link the core in to the
  1479. final app if they want stand alone.
  1480.  
  1481. --
  1482. MacXperts, Inc.                     804.353.7122
  1483. Certified Apple Developers          fax 804.358.3847
  1484. 3228-L West Cary St.                applelink: xperts
  1485. Richmond, VA  23221                 net: xperts@infi.net
  1486.  
  1487. +++++++++++++++++++++++++++
  1488.  
  1489. >From d88-jwa@dront.nada.kth.se (Jon Wdtte)
  1490. Date: 22 Jul 1994 17:44:32 GMT
  1491. Organization: The Royal Institute of Technology
  1492.  
  1493. In <QUASAR.94Jul21132717@shadowgard.ctt.bellcore.com> quasar@ctt.bellcore.com (Laurence R. Brothers) writes:
  1494.  
  1495. >Keep in mind I'm used to an environment where you just don't have to
  1496. >worry about managing and dispatching your own events, and even
  1497. >updating windows will often be magically taken care of for you.  Most
  1498.  
  1499. Well, using a GUI toolkit for the Mac, like MacApp, TCL or the
  1500. non-C++ TransSkel, will take care of that for you. No muss no fuss.
  1501.  
  1502. >* What, I have to write my own event loop? Haven't they heard of
  1503. >callbacks?  Interposition? Well, I guess it's not a pre-emptive OS,
  1504. >but still, does that make any difference?
  1505.  
  1506. Do it once, then it's done. Or use one of the libraries available
  1507. and pointed out in the FAQ. If you really want to, this means you
  1508. can get more control if you really want to.
  1509.  
  1510. >* I have to manage operating system events myself? What's the point of
  1511. >having an operating system if it can't manage its own events?
  1512.  
  1513. What do you mean operating-system events? The only one I can think
  1514. of is the diskEvent, which, again, is handled by all available libraries,
  1515. or you write it once from sample code and forget it - the pro is that
  1516. you can intercept the event and do something interesting to the floppy
  1517. if you want to.
  1518.  
  1519. >I also must admit that I have only been using MPW C, not MacApp or any
  1520. >of the C++ stuff as yet. I imagine that every Mac programmer must use
  1521.  
  1522. See, there you go. It's like trying to write something in XLib.
  1523. You CAN, but it's not a good idea. For plain C, try TransSkel.
  1524.  
  1525. >while, be it MacApp, AppWannaBe, or whatever, but still, the whole
  1526. >thing seems a lot more awkward than it really needs to be.
  1527.  
  1528. Have you ever used XLib?
  1529.  
  1530. -- 
  1531.  -- Jon W{tte, h+@nada.kth.se, Mac Software Engineer Deluxe --
  1532.     
  1533. "Something horrible is wrong."
  1534.     - Steve Falkenberg
  1535.  
  1536. +++++++++++++++++++++++++++
  1537.  
  1538. >From nagle@netcom.com (John Nagle)
  1539. Date: Fri, 22 Jul 1994 17:46:26 GMT
  1540. Organization: NETCOM On-line Communication Services (408 261-4700 guest)
  1541.  
  1542. afcjlloyd@aol.com (AFC JLloyd) writes:
  1543. >Yes, you've got it right, even down to your suspicion that application
  1544. >framework libraries like MacApp are what you are missing.  At one time
  1545. >Apple hinted that a framework like MacApp might make it into ROM, but that
  1546. >idea seems to have been abandoned, which in my opinion is just as well.  I
  1547. >worked on Bedrock for two years, which was to be a next generation
  1548. >framework (and may still become one in its reincarnation as the OpenDoc
  1549. >Parts Framework).  My experiences tell me that we still have more to learn
  1550. >about the right way to create application frameworks; putting one into ROM
  1551. >at this point seems like a bad idea.
  1552.  
  1553. >All of the established frameworks address many of the points you raise,
  1554. >but none are without flaws.  So, you should survey the established
  1555. >frameworks, pick one, and then be prepared to enter a love/hate
  1556. >relationship with it.
  1557.  
  1558.        The basic problem is that all the Mac frameworks are lousy.
  1559. Apple's MacApp is big, old, clunky, and weakly supported.  Last year at this
  1560. time, Apple was telling developers to go to Symantec's Bedrock, which
  1561. got as far as a CD-ROM with the Bedrock headers and some sample apps
  1562. before being dropped.  Symantec has the "old TCL", written for their
  1563. dialect of C with some C++ extensions; it's widely used, more or less
  1564. stable, and on the way out.  Symantec also has the "new TCL", which is
  1565. true C++, very new, and very buggy.  Symantec is generally considered
  1566. to be concentrating on the Windows market now.  Then there's the new
  1567. vendor, MetroWerks, which is selling an almost-finished C++ compiler
  1568. (no templates) and a somewhat thin class library that goes with it.
  1569. Generally, users of MetroWerks are happier with their vendor than
  1570. Symantec users.
  1571.  
  1572.         There's also the "Nerdworks" library, which is a free class
  1573. library available on Apple's "ftp.apple.com", and there's a book that
  1574. goes with it.  This is a weak, but workable class library.
  1575.  
  1576.         At the high end, there are some tools from Neuron Data that
  1577. allow cross-platform development, but pricing is in the $10K and up
  1578. range.
  1579.  
  1580.                     John Nagle
  1581.  
  1582. +++++++++++++++++++++++++++
  1583.  
  1584. >From shebs@cygnus.com (Stan Shebs)
  1585. Date: Fri, 22 Jul 1994 18:51:39 GMT
  1586. Organization: /cygint/s1/users/shebs/.organization
  1587.  
  1588.  
  1589. In article <QUASAR.94Jul21132717@shadowgard.ctt.bellcore.com> quasar@ctt.bellcore.com (Laurence R. Brothers) writes:
  1590.  
  1591.    * What, I have to write my own event loop? Haven't they heard of
  1592.    callbacks?  Interposition? Well, I guess it's not a pre-emptive OS,
  1593.    but still, does that make any difference?
  1594.  
  1595. When I first wrote Xconq for X10, when the Xt toolkit was too broken to use,
  1596. guess what, I had to write my own event loop!
  1597.  
  1598. Actually, the value of the explicit event loop is that you can bypass
  1599. when necessary.  A heavily-tuned Mac program can have a number of event
  1600. loops, such as the one that handles the spiffy scrollbar response when
  1601. you're dragging the thumb.  This kind of thing really helps performance.
  1602.  
  1603. In general, Mac applications (binaries, not sources) are smaller and
  1604. use the CPU more efficiently than Unix/X applications.  It's very educational
  1605. to put a 68000-based Mac Plus side-by-side with a Sparc-based Sun machine,
  1606. and watch the Plus run interactive programs smoother and faster than the Sun!
  1607.  
  1608.    * Wait a minute, this isn't a scrollbar, it's just a bit of graphics.
  1609.    It doesn't actually *do* anything. It takes a page of code just to get
  1610.    to the point that you find out which scrollbar thingie got clicked on,
  1611.    then you have to do it all yourself. Apple wouldn't have to have all
  1612.    this style guide stuff if they actually implemented any functionality
  1613.    anywhere.
  1614.  
  1615. What makes you think that everybody wants to do scrollbars the same
  1616. way?  There are many application-specific optimizations and variations
  1617. available.  If you ever get to a point where you need to do one of these,
  1618. you'll be very glad it's not in ROM!
  1619.  
  1620. Incidentally, the guidelines are intended only as a starting point.  Many of
  1621. the interface developments of the past ten years started out by violating
  1622. some guideline, but then went on become part of the guidelines themselves.
  1623. Just compare a 1984 IM with the latest HIG...
  1624.  
  1625.    * I guess geometry management is too much to ask for? Oh well. Should
  1626.    have known better than to ask. Of course there are no subwindows on
  1627.    the Mac anyhow, so I guess there's not much point.
  1628.  
  1629. After having wasted months and years of my life messing with X's yucko
  1630. notions of "geometry management", I was very happy not to have that on
  1631. Macs.
  1632.  
  1633.    I have to qualify all this by saying I've only been messing around
  1634.    with Mac programming for a few weeks, so I am not used to it all yet,
  1635.    but still.... I would have thought the basic programming paradigm
  1636.    might have advanced slightly in the last 10 years, at least to the
  1637.    extent of a standard re-entrant toolkit event-loop with callbacks and
  1638.    event interposition instead of all this manual dispatching. Even in an
  1639.    antique like Sunview you could code a typical application in probably
  1640.    1/5 to 1/2 the space of an equivalent Mac application. 
  1641.  
  1642. Of course, the main application that everybody runs in a "modern" Unix
  1643. environment is a terminal emulator set to mimic terminals from 10-20 years
  1644. ago, still you type "ls" and "rm" just like Ken and Dennis did, and
  1645. heaven help you if you try to write a program that doesn't have a console
  1646. available for stdout to write to, even if it *is* an "toolkit event-loop
  1647. with callbacks".  
  1648.  
  1649. I think you'll find that it takes more than a few weeks to realize that
  1650. the Unix style of programming is not the only way, and that the Mac style,
  1651. in addition to its weaknesses, has many strengths that the Unix world has
  1652. yet to approach.
  1653.  
  1654.    It must take at least 500 lines of C to produce a Mac application that
  1655.    is minimally conformant to the general rules of application behavior,
  1656.    probably more. IMHO, even a 3 line hello world program should
  1657.    automagically do all "the right things" because the windowing
  1658.    environment/finder/OS/whatever should take care of it all.
  1659.  
  1660. That's not exactly fair, because the "3-line hello world" of Unix doesn't do
  1661. *any* interaction at all.  If I just wanted to scribble on the screen and
  1662. exit, I could write a pretty short Mac program for that, and do it with just
  1663. the basic Mac traps.
  1664.  
  1665. Also, once the basic framework is in place, you don't have to mess with it
  1666. anymore.  I now have versions of Xconq for both Macs and X11, and it's
  1667. *much* easier to add a new menu item or button or image to the Mac version,
  1668. so much so that my Mac version usually gets all the features first.
  1669.  
  1670.    Of course there are many
  1671.    things available on the Mac platform that are either real expensive or
  1672.    very hard to implement in the typical unix environment. 
  1673.  
  1674. Amen to that!  Try having a reasonable response time when dragging
  1675. something with the mouse.  Can you say "stu-stutt-stu-st-stutter"?
  1676.  
  1677.    Still, I would
  1678.    really like someone to tell me: "You obviously haven't used the foo
  1679.    class libraries with the bar uims package and the baz event manager
  1680.    yet, so what do you expect".
  1681.  
  1682. Others have gone into the details, so I'll just leave it at the "what do you
  1683. expect". :-)
  1684.  
  1685.                             Stan Shebs
  1686.                             Cygnus Support
  1687.                             shebs@cygnus.com
  1688.  
  1689. +++++++++++++++++++++++++++
  1690.  
  1691. >From Jens Alfke <jens_alfke@powertalk.apple.com>
  1692. Date: Fri, 22 Jul 1994 17:24:12 GMT
  1693. Organization: Apple Computer
  1694.  
  1695. Stuart R. Harper, stuart@lorelei.ece.drexel.edu writes:
  1696. > That was an EXTREME cop-out. Reading Mr. Brothers list of complaints
  1697. > reminded me of my own annoyance with programming the mac after moving over
  1698. > from the Amiga, a 256K RAM/ROM, 68K based system.
  1699.  
  1700. Well, I'm not saying that the design of the Mac OS was perfect; I think they
  1701. really screwed up in some areas and we're still paying the price for that.
  1702. Your point about the Amiga is valid; nevertheless, note that the Amiga came
  1703. out a few years after the Mac and was able to learn from some of its mistakes
  1704. (the same can be said for Windows). Also, both may seem tiny by today's
  1705. standards but there is a _big_ difference between a system with 256k each of
  1706. RAM and ROM, and one with 128k RAM and 64k ROM. The Amiga had twice the RAM
  1707. (which means much more RAM available to apps) and four times the ROM, so that
  1708. gave them more headroom to put in things like e.g. threading and an improved
  1709. Toolbox interface.
  1710.  
  1711. > Requiring the development environment to push basic features invites all
  1712. > kinds of compatibilty problems between systems, increases development time
  1713. > with wasted compilation of 'standard' actions and increases the overall
  1714. > code 'bloat'.
  1715.  
  1716. Good dynamic linking technology, as is finally starting to appear on the Mac
  1717. with ASLM and SOM, will take care of a lot of that. (Note that the NeXT
  1718. application framework is a shared library living on top of a very Mac-like
  1719. lower level toolbox.) I really don't care whether the code that handles my
  1720. basic app functionality is in ROM or in a shared library; it looks the same
  1721. to me, and the library is easier to update and maintain. OpenDoc and its
  1722. framework will take advantage of this in a big way.
  1723.  
  1724. --Jens Alfke
  1725.   jens_alfke@powertalk              Rebel girl, rebel girl,
  1726.             .apple.com              Rebel girl you are the queen of my world
  1727.  
  1728. +++++++++++++++++++++++++++
  1729.  
  1730. >From isis@netcom.com (Mike Cohen)
  1731. Date: Fri, 22 Jul 1994 18:21:07 GMT
  1732. Organization: ISIS International
  1733.  
  1734. Look at one of the class libraries or application frameworks such as TCL,
  1735. MacApp, or PowerPlant. All of them take care of the event dispatching & all
  1736. of the other things that you're so grossed out about - you only have to add
  1737. your own callbacks by overriding various behaviours, such as clicking in the
  1738. content are of a pane. They even handle scrolling by providing a scroller
  1739. object which does most of the work.
  1740. -- 
  1741. Mike Cohen - isis@netcom.com
  1742. NewtonMail, eWorld: MikeC / ALink: D6734 / AOL: MikeC20
  1743. Home Page: file://ftp.netcom.com/pub/isis/home.html
  1744.  
  1745. +++++++++++++++++++++++++++
  1746.  
  1747. >From oster@netcom.com (David Phillip Oster)
  1748. Date: Fri, 22 Jul 1994 18:32:14 GMT
  1749. Organization: Netcom Online Communications Services (408-241-9760 login: guest)
  1750.  
  1751.  
  1752. Just to add my fuel to the flame war:
  1753.  
  1754. There is geometry management, if you want it, so it doesn't cost you 
  1755. anything if you don't use it. You get it by writing rez #define expressions.
  1756. This lets you line dialog items up, or arrange them any way you like,
  1757. but at compile time, rather than run time.
  1758.  
  1759. Ever try to write copy and paste in motif? There are multiple, incompatible
  1760. definitions of the clipboard, so doing what on a mac is
  1761. ZeroScrap()
  1762. PutScrap()
  1763.  
  1764. takes pages of code to do correctly (read the emacs source for an example.)
  1765. - - - -
  1766. Callbacks are just syntactic sugar around X's event loop. If you know, 
  1767. because you are writing your program, what procedure you are going to call
  1768. in response to an event, then it is much simpler to simply call the procedure:
  1769. for(;;){
  1770.     GetNextEvent(everyEvent, &event);
  1771.     switch(event->what){
  1772.     case keyDown: GoKey(&event);    break;
  1773.     ...
  1774.     }
  1775. }
  1776.  
  1777. as opposed to the mysterious:
  1778.     XtAddCallback(rootWidget, XmNkeyDownEventCallback, GoKey, NULL);
  1779.  
  1780. In fact, Apple has lost the vision, and started importing to many unix heads:
  1781. the interface to the Applescript inter-application communication system looks
  1782. like it was designed by Unix wannabees.
  1783.  
  1784. When you are trying to debug a program, it is much easier to put a single
  1785. breakpoint in an explicit event loop, and trace it than it is to have the
  1786. heart of the program embedded in some system undebuggable library, and have
  1787. to set breakpoints in ALL your callbacks because you don't know which one
  1788. will trigger.
  1789.  
  1790. X gives you no help with printing: once you write your application to
  1791. do its drawing to the screen, you need to write it a second time to
  1792. directly generate postscript, so you can write a text file of postsript
  1793. to send to the printer. On the mac, you open a printer GrafPort, and
  1794. do the same drawing to it that you do to the screen. The translation
  1795. to the printer driver happens automatically.
  1796.  
  1797. Then of course, there is the speed of progress in the two environments.
  1798. At least there is a standard inter-application communication system for
  1799. the Mac.  Unix still hasn't fixed the security bug in "login" I reported
  1800. back in 1977 : 17 years ago.
  1801.  
  1802. I've done numerous commercial products on Macintosh and on Unix/Motif.
  1803. Macs are much easier to program at the toolbox level than Unix/Motif.
  1804.  
  1805. +++++++++++++++++++++++++++
  1806.  
  1807. >From Rob Browning <osiris@cs.utexas.edu>
  1808. Date: 22 Jul 1994 19:30:30 GMT
  1809. Organization: The University of Texas at Austin, Austin, Texas
  1810.  
  1811. In article <30p0i0$fhi@news.kth.se> Jon W!tte, d88-jwa@dront.nada.kth.se writes:
  1812. >>Keep in mind I'm used to an environment where you just don't have to
  1813. >>worry about managing and dispatching your own events, and even
  1814. >>updating windows will often be magically taken care of for you.  Most
  1815.  
  1816. Une thing that I would mention is that MCL (Yes that's Macintosh Common 
  1817. Lisp) has a very impressive class library that handles your interface 
  1818. with the Mac Toolbox.  It has callbacks, it handles the event loop behind 
  1819. your back, and you don't ever have to call WaitNextevent (but you can if 
  1820. you like).
  1821.  
  1822. It supports windows which contain views which contain subviews...  And 
  1823. you just subclass one of these and override it's view-draw-contents 
  1824. method, and you are on your way.  All this and much much more :>
  1825.  
  1826. And not to start a religious war, but if you put in all the type 
  1827. declarations in your code (the ones that you have to put in a C/C++ 
  1828. program) you can get quite good performance.  No, it won't beat C or C++ on 
  1829. a reguar basis, But as a development/prototyping environment, it is quite 
  1830. impressive.  It's too bad it looks like it is going the way of the DoDo.  
  1831. MCL shows what Apple can do if they put their mind to it.  And as good as 
  1832. Dylan sounds, it's not quite as powerful as Common Lisp.
  1833.  
  1834. --Rob.
  1835.  
  1836. +++++++++++++++++++++++++++
  1837.  
  1838. >From ingemar@lysator.liu.se (Ingemar Ragnemalm)
  1839. Date: 22 Jul 1994 20:23:12 GMT
  1840. Organization: (none)
  1841.  
  1842. mburch@ksu.ksu.edu (Matt Burch) writes:
  1843.  
  1844. >For most of the stuff you mentioned, I use the freeware
  1845. >TransSkel 3.0. It does all the event handling, menus, windows, etc.
  1846. >and calls my callback routines when something relavent happens.
  1847. >Easy as 3.1415927.
  1848.  
  1849. One of the *best* things with TransSkel is that while it does simplify the
  1850. programming a lot (making trivial programs trivial to write) I still have
  1851. full access to the Toolbox as much as I *want*.
  1852.  
  1853. For example, when I wanted to handle suspend/resume events, using TransSkel
  1854. 2.0 (which was made before suspend/resume was invented), I could add that
  1855. without editing TransSkel at all!
  1856.  
  1857. I still use TransSkel 2.0 (updated for some "new" stuff like WNE and
  1858. hierarcical menus), and it works just great. I guess 3.0 is better,
  1859. but it doesn't come with Pascal-useable TransEdit and TransDisplay.
  1860.  
  1861. Programming the Mac from the ground up from the Toolbox, without a package
  1862. like that, is really confusing. Getting into stuff like Apple Events,
  1863. Appletalk and QuickTime is even worse. I find myself writing simplified
  1864. interfaces to all of them as I start using them. You can go to that level
  1865. later, but do yourself a favor and start on a level that is simpler.
  1866.  
  1867. --
  1868. - -
  1869. Ingemar Ragnemalm, PhD
  1870. Image processing, Mac shareware games
  1871. E-mail address: ingemar@isy.liu.se or ingemar@lysator.liu.se
  1872.  
  1873. +++++++++++++++++++++++++++
  1874.  
  1875. >From aclaasse@nyx.cs.du.edu (Arne Claassen)
  1876. Date: 22 Jul 1994 15:04:21 -0600
  1877. Organization: University of Denver, Dept. of Math & Comp. Sci.
  1878.  
  1879. In article <30n74k$7nr@matt.ksu.ksu.edu>,
  1880. Matt Burch <mburch@ksu.ksu.edu> wrote:
  1881. >For most of the stuff you mentioned, I use the freeware
  1882. >TransSkel 3.0. It does all the event handling, menus, windows, etc.
  1883. >and calls my callback routines when something relavent happens.
  1884. >Easy as 3.1415927.
  1885.  
  1886. Where can i find TransSkel? I've tried archie and sumex-aim. but to no
  1887. avail. is it under a different name than transskel?
  1888.  
  1889. Arne F. claassen
  1890. claassen@ebs330.eb.uah.edu
  1891.  
  1892.  
  1893.  
  1894. +++++++++++++++++++++++++++
  1895.  
  1896. >From shimpei@leland.Stanford.EDU (Shimpei Yamashita)
  1897. Date: 23 Jul 1994 10:22:40 GMT
  1898. Organization: Stanford University, CA 94305, USA
  1899.  
  1900. In article <30pc8l$1kk@nyx.cs.du.edu>,
  1901. Arne Claassen <aclaasse@nyx.cs.du.edu> wrote:
  1902.  
  1903. :Where can i find TransSkel? I've tried archie and sumex-aim. but to no
  1904. :avail. is it under a different name than transskel?
  1905. :
  1906. :Arne F. claassen
  1907. :claassen@ebs330.eb.uah.edu
  1908. :
  1909. :
  1910. ftp.primate.wisc.edu in /pub/mac/TransSkel
  1911.  
  1912. Would someone like to upload it to sumex? I just got it, and I don't want
  1913. to upload anything I haven't evaluated for a few days.
  1914. -- 
  1915. Shimpei Yamashita, Stanford University           shimpei@leland.stanford.edu
  1916.  
  1917. +++++++++++++++++++++++++++
  1918.  
  1919. >From d88-jwa@dront.nada.kth.se (Jon Wdtte)
  1920. Date: 24 Jul 1994 10:52:09 GMT
  1921. Organization: The Royal Institute of Technology
  1922.  
  1923. In <stuart-2307941144580001@e4-lebow-n1-5-35.ece.drexel.edu> stuart@lorelei.ece.drexel.edu (Stuart R. Harper) writes:
  1924.  
  1925. >Agreed! Quick adoption of ASLM will make up for alot of real or perceived
  1926. >problem in Mac code development i.e. You don't like rolling all your own
  1927. >UI code, find GUI library that you like that does the job for you.
  1928.  
  1929. ASLM is doomed to die; except OpenTransport will use it so it
  1930. has to survive :-(
  1931.  
  1932. ASLM does dynamic linking of C++ classes compiled with MPW C++
  1933. (CFront) For other things, with other compilers/environments,
  1934. it doesn't work.
  1935.  
  1936. SOM is the future, and it will be on top of the CFM which is _here_
  1937. in production, release, use, ... since March 14.
  1938.  
  1939. Cheers,
  1940.  
  1941.                     / h+
  1942. -- 
  1943.  -- Jon W{tte, h+@nada.kth.se, Mac Software Engineer Deluxe --
  1944.  
  1945. "Windows doesnUt use AppleEvents."
  1946.     - Anon
  1947.  
  1948. +++++++++++++++++++++++++++
  1949.  
  1950. >From Mark Hanrek <hanrek@cts.com>
  1951. Date: Sun, 24 Jul 1994 10:45:55 GMT
  1952. Organization: The Information Workshop
  1953.  
  1954.  
  1955. There have been many enlightened observations, and a few chuckles, too,
  1956. regarding a lot of related things.
  1957.  
  1958. I was rolling on the floor when I read the one about where...
  1959.  
  1960.      "The Mac was built only half-way, and the 
  1961.       rest was left as an exercise for the reader."
  1962.  
  1963.  
  1964. But with respect to identifying the real source of Mr. Brother's
  1965. programming problems, you've all missed it.
  1966.  
  1967.   --------------------------------------------------------------
  1968.    The problem is with HOW one is introduced to any new subject.
  1969.   --------------------------------------------------------------
  1970.  
  1971. If an excellent guide were sitting next to him for a week or two, he
  1972. would still be having a pleasant experience, regardless of platform, and
  1973. probably out-producing most of the rest of his colleagues.
  1974.  
  1975. But, every last one of us is thrown into any new subject, sink or swim...
  1976.  
  1977.  
  1978. - --
  1979.  
  1980. When it gets frustrating, we question the design.  :)  And rightly so!
  1981.  
  1982. But when we're finally making progress, we forget, and go back to
  1983. accepting things the way they are.
  1984.  
  1985. And "acceptance" is what perpetuates "the trap", where we are all so busy
  1986. trying to catch up that we never have any extra time to help make things
  1987. better.
  1988.  
  1989.  
  1990. - --- The Power of Simplicity
  1991.  
  1992. Simple "guided introductions" into a new <whatever> can mean 5,000 people
  1993. working productively with <whatever>, instead of 50.
  1994.  
  1995. It means avoiding and preventing humongous amounts of floundering,
  1996. repeating classic mistakes, repeated questions, and having to reverse
  1997. incorrect models we've created in our heads.
  1998.  
  1999. And so easily done.  It doesn't take much.
  2000.  
  2001.  
  2002. - --- Case In Point As We Speak
  2003.  
  2004. Mark my words.  You read it here (too).
  2005.  
  2006. In three years we'll all be wondering why it has taken forever for
  2007. OpenDoc to catch on.  Everyone will have an opinion.
  2008.  
  2009. Yes, there were the "guided introductions" into the fabulous world of
  2010. OpenDoc made available through Apple's Developer University, but their
  2011. effectiveness was negated by Apple needing to make a return on its
  2012. investment in developing its tutorials, rather than its investment in the
  2013. supply of OpenDoc-savvy programmers, and as a consequence only 50
  2014. programmers purchased them.
  2015.  
  2016.  
  2017. Well...
  2018.  
  2019.   What did we expect when we take an existing set of programmers,
  2020.   and then ALL AT ONCE ask them to...
  2021.  
  2022.      * learn how to use a second development environment 
  2023.        (MPW or ToolServer) along with their primary one, 
  2024.        with many ALSO switching to a new primary environment.
  2025.  
  2026.      * learn C++.
  2027.  
  2028.      * learn the tricks of the trade for writing programs that 
  2029.        run correctly on the PowerMacintosh.
  2030.  
  2031.      * get their object-oriented savvy developed so they too can
  2032.        speak comfortably of mixin classes, operator overloading,
  2033.        iostreams, templates, virtual destructors, unmangling,
  2034.        and the relative merits of various class libraries.
  2035.  
  2036.      * Get up ot speed on at least one of Apple's new technologies,
  2037.        which includes AppleScript/OSA, Drag Manager, AE/Object, 
  2038.        AOCE, Threads, CommToolbox/TCP, Components/ASLM, new printing
  2039.        architecture, etc.
  2040.  
  2041.      * Produce sellable OpenDoc parts by mastering OpenDoc's
  2042.        new paradigms, new terms and concepts, normally large class
  2043.        library, IBM's SOM, and the new tools that work with them.
  2044.  
  2045.  
  2046. That's "the shock of the new".
  2047.  
  2048. How can we expect programmers to make progress when they are "thrown in"
  2049. to handle all of this, unguided, sink or swim, and offered no way to get
  2050. past dog-paddling?
  2051.  
  2052. Every question in csmp that has been asked before is DOG-PADDLING.  
  2053.  
  2054. Every valuable question/answer that is not saved and made easily
  2055. re-accessible in a central place perpetuates DOG-PADDLING.
  2056.  
  2057.  
  2058. - ---------------------------------------------------------------------
  2059.  
  2060. ... and all this just seems to go in one ear, and out the other, 'cuz
  2061. things go right back to the way they were, just like the discussion in
  2062. this thread will.  
  2063.  
  2064. Watch...  
  2065.  
  2066. :)
  2067.  
  2068.  
  2069. Mark Hanrek
  2070. The Information Workshop
  2071.  
  2072. +++++++++++++++++++++++++++
  2073.  
  2074. >From stuart@lorelei.ece.drexel.edu (Stuart R. Harper)
  2075. Date: Sat, 23 Jul 1994 11:44:58 -0400
  2076. Organization: Drexel U.
  2077.  
  2078. In article <1994Jul22.172412.20391@gallant.apple.com>, Jens Alfke
  2079. <jens_alfke@powertalk.apple.com> wrote:
  2080.  
  2081. > Stuart R. Harper, stuart@lorelei.ece.drexel.edu writes:
  2082. > > That was an EXTREME cop-out. Reading Mr. Brothers list of complaints
  2083. > > reminded me of my own annoyance with programming the mac after moving over
  2084. > > from the Amiga, a 256K RAM/ROM, 68K based system.
  2085. > Well, I'm not saying that the design of the Mac OS was perfect; I think they
  2086. > really screwed up in some areas and we're still paying the price for that.
  2087. > Your point about the Amiga is valid; nevertheless, note that the Amiga came
  2088. > out a few years after the Mac and was able to learn from some of its mistakes
  2089. > (the same can be said for Windows). Also, both may seem tiny by today's
  2090. > standards but there is a _big_ difference between a system with 256k each of
  2091. > RAM and ROM, and one with 128k RAM and 64k ROM. The Amiga had twice the RAM
  2092. > (which means much more RAM available to apps) and four times the ROM, so that
  2093. > gave them more headroom to put in things like e.g. threading and an improved
  2094. > Toolbox interface.
  2095.  
  2096. True enough, but when the Mac+ and MacII made their rollouts with their
  2097. 128KROM and 256KROM, Apple still didn't see fit to add a "Default Action
  2098. Manager" or update the Toolbox/Event Manager to take care of basic
  2099. user-interface function. Yeah, I know, they had alot of other development
  2100. going on (Color QuickDraw, 020 migration, Networking etc), but adding a
  2101. basic event->action or even a shared library framework to the ROM would
  2102. have made accessing new features a breeze. 
  2103.  
  2104.  
  2105. > > Requiring the development environment to push basic features invites all
  2106. > > kinds of compatibilty problems between systems, increases development time
  2107. > > with wasted compilation of 'standard' actions and increases the overall
  2108. > > code 'bloat'.
  2109. > Good dynamic linking technology, as is finally starting to appear on the Mac
  2110. > with ASLM and SOM, will take care of a lot of that. (Note that the NeXT
  2111. > application framework is a shared library living on top of a very Mac-like
  2112. > lower level toolbox.) I really don't care whether the code that handles my
  2113. > basic app functionality is in ROM or in a shared library; it looks the same
  2114. > to me, and the library is easier to update and maintain. OpenDoc and its
  2115. > framework will take advantage of this in a big way.
  2116.  
  2117. Agreed! Quick adoption of ASLM will make up for alot of real or perceived
  2118. problem in Mac code development i.e. You don't like rolling all your own
  2119. UI code, find GUI library that you like that does the job for you.
  2120.  
  2121. -- 
  2122. Stuart R. Harper - E4 Lab Technician - LeBow 132 - CCD - Drexel U.
  2123. stuart@lorelei.ece.drexel.edu        harper@e4mail.ece.drexel.edu
  2124.  
  2125. +++++++++++++++++++++++++++
  2126.  
  2127. >From nagle@netcom.com (John Nagle)
  2128. Date: Sun, 24 Jul 1994 17:10:21 GMT
  2129. Organization: NETCOM On-line Communication Services (408 261-4700 guest)
  2130.  
  2131. Rob Browning <osiris@cs.utexas.edu> writes:
  2132. >In article <30p0i0$fhi@news.kth.se> Jon W!tte, d88-jwa@dront.nada.kth.se writes:
  2133. >>>Keep in mind I'm used to an environment where you just don't have to
  2134. >>>worry about managing and dispatching your own events, and even
  2135. >>>updating windows will often be magically taken care of for you.  Most
  2136.  
  2137. >Une thing that I would mention is that MCL (Yes that's Macintosh Common 
  2138. >Lisp) has a very impressive class library that handles your interface 
  2139. >with the Mac Toolbox.  It has callbacks, it handles the event loop behind 
  2140. >your back, and you don't ever have to call WaitNextevent (but you can if 
  2141. >you like).
  2142.  
  2143.        Is this still an active product?  Is there a PPC version?
  2144.  
  2145.        We used to think Common LISP was big.  Then came C++.
  2146.  
  2147.                     John Nagle
  2148.  
  2149. +++++++++++++++++++++++++++
  2150.  
  2151. >From d88-jwa@hemul.nada.kth.se (Jon Wdtte)
  2152. Date: 24 Jul 1994 17:45:49 GMT
  2153. Organization: The Royal Institute of Technology
  2154.  
  2155. In <CtFxwL.K0B@crash.cts.com> Mark Hanrek <hanrek@cts.com> writes:
  2156.  
  2157. >Simple "guided introductions" into a new <whatever> can mean 5,000 people
  2158. >working productively with <whatever>, instead of 50.
  2159.  
  2160. If the <whatever> is the Mac toolbox, there are courses from
  2161. the Developer University, both self-paced and on-site. They
  2162. are expensive, but from what I hear, very good.
  2163.  
  2164. >It means avoiding and preventing humongous amounts of floundering,
  2165.  
  2166. The FAQ for this group is intended to at least give a hint of what
  2167. you should do in that situation.
  2168.  
  2169. >That's "the shock of the new".
  2170.  
  2171. Well, with these new technologies, and OpenDoc specifically, it
  2172. seems as if Apple is trying to bet it all on one card: We Want The
  2173. Future To Be Like This. Unfortunately, they don't do it with all
  2174. their hearts, orr rather, with all their wallet, just with all of
  2175. their minds, which may explain why Apple seems so mindless of
  2176. other things :-)
  2177.  
  2178. I can envision a future where OpenDoc works the wonders it's supposed
  2179. to do, but as you say: it's all about adoption. And adoption right
  2180. now is not feasible; there's not even a sanctioned way of using a
  2181. scroll bar...
  2182.  
  2183. Cheers,
  2184.  
  2185.                     / h+
  2186. -- 
  2187.  -- Jon W{tte, h+@nada.kth.se, Mac Software Engineer Deluxe --
  2188.  
  2189.   I offer a pot of gold for Gates' head on a pole.
  2190.   Naah - bashing Microsoft is "out." Love, Peace and Understanding!
  2191.  
  2192. +++++++++++++++++++++++++++
  2193.  
  2194. >From aclaasse@nyx.cs.du.edu (Arne Claassen)
  2195. Date: 24 Jul 1994 14:43:57 -0600
  2196. Organization: University of Denver, Dept. of Math & Comp. Sci.
  2197.  
  2198. In article <nagleCtGFp9.GGo@netcom.com>, John Nagle <nagle@netcom.com> wrote:
  2199. >       Is this still an active product?  Is there a PPC version?
  2200. >
  2201. >       We used to think Common LISP was big.  Then came C++.
  2202.  
  2203. The last version is MCL 2.0 and available from APDA. Dunno the price, but i'd
  2204. say about $500. 
  2205.  
  2206. MCL 2.0 is an updated version of Franz's Allegro Common LISP and does include
  2207. CLOS (Common Lisp Object System) as to the specifications discussed by Guy
  2208. Steele in Common Lisp: The Language, second edition. It does not, however
  2209. include CLIM (Common LISP Interface Manager) which will allow transporatable
  2210. application development for all Common LISP platforms. CLIM is available in
  2211. beta (maybe later by now) form from a number of independent developers.
  2212. Forget support from Apple, tho. You'd actually get more helpful info from Franz
  2213. although they don't support it either.
  2214.  
  2215. So, no PPC and not likely either.
  2216.  
  2217. On the other hand, for large applications, it's a great development platform,
  2218. does include excellent tools for dealing with interface elements and implements
  2219. the Event Loop in the environment.
  2220.  
  2221. Of course there's always the overhead. A simple application will take almost
  2222. a Meg in LISP overhead for the compiled application, but if you build a five
  2223. meg application, that's not too bad (HMM.. me thinks, MS Windows was developed
  2224. in LISP with their overhead... :)
  2225.  
  2226. Arne F. Claassen     claassen@ebs330.eb.uah.edu
  2227.  
  2228.  
  2229.  
  2230. +++++++++++++++++++++++++++
  2231.  
  2232. >From aclaasse@nyx.cs.du.edu (Arne Claassen)
  2233. Date: 25 Jul 1994 07:30:39 -0600
  2234. Organization: University of Denver, Dept. of Math & Comp. Sci.
  2235.  
  2236. In article <30voj2$j37@news.kth.se>,
  2237. Jon Wdtte <d88-jwa@hemul.nada.kth.se> wrote:
  2238. >In <30u5jq$fvg@acmex.gatech.edu> gt7092d@prism.gatech.edu (Damir Smitlener) writes:
  2239. >>Until there is something like Visual C++ (if there is and i havent  
  2240. >>seen it, please tell me! and i dont mean multi-thousand dollar 
  2241. >>packages.), ile leave 'Mac' programming to those who want it. 
  2242. >
  2243. >Why not pay a few thousand dollars for a good package? You paid
  2244. >a lot for you Mac, you're going to earn your living with it, so
  2245. >you'd better have decent tools, right?
  2246.  
  2247. Um, i the point is that on inferior (ok, if someone wants to flame me for
  2248. calling Windows inferior, go right ahead) platforms there are excellent tools
  2249. for developing software and one can worry less about meeting the overhead
  2250. needed for a program that fits well into the platform. While on the mac, there
  2251. really isn't anything like cheap tools, such as Visual C++, so why should i
  2252. spent more money than a Windows developer? Because of the glory and
  2253. warm'n'fuzzy-feeling of programming for the Macintosh? Um, i love my Mac and
  2254. i'll never go back to PCs, but i don't see why there cannot be a development
  2255. environment worth the OS we work with.
  2256. >
  2257. >>All these defenses of mac-programming here confuse me; do you
  2258. >>folks WANT to work that hard on non-essentials? Doesnt anyone
  2259. >
  2260. >No; we DON'T work hard on essentials. Either we did it once
  2261. >before, and copy/paste into a new project, or we use one of the
  2262. >many good environments/frameworks available. But if you're the
  2263. >typical lazy integrator consultant type, I'm not surprised you
  2264. >don't want to do the research necessary before condemning a
  2265. >platform you haven't used for any extended period of time.
  2266.  
  2267. I'm doing research and i'm getting places, but it's still annoying. But 
  2268. defending the intrinic necessity for the overhead in even handling and
  2269. interface management, strikes me in much of the same way as the arguments
  2270. from unix-people i know that try to convince me of the intrinsic superiority
  2271. command lines as opposed to GUIs (another posssible flame war, but i'd rather
  2272. not get into that one)
  2273.  
  2274. Arne F. Claassen
  2275. - --
  2276. claassen@ebs330.eb.uah.edu
  2277.  
  2278.  
  2279. +++++++++++++++++++++++++++
  2280.  
  2281. >From gt7092d@prism.gatech.edu (Damir Smitlener)
  2282. Date: 24 Jul 1994 12:41:30 -0400
  2283. Organization: Georgia Institute of Technology
  2284.  
  2285. >How can we expect programmers to make progress when they are "thrown in"
  2286. >to handle all of this, unguided, sink or swim, and offered no way to get
  2287. >past dog-paddling?
  2288.  
  2289. Simple answer: you cant. As a relative newcomer to the mac, but
  2290. not to programming in general, I write NO software that can be
  2291. considered 'Mac-like.' I write using standard c/c++, which means
  2292. i basically write unix-code. To take this code to windows has
  2293. proven quite painless with tools like Visual C++. Going to X ,
  2294. not too bad.
  2295.  
  2296. Making it Mac software? Uhh...ime simply not interested in working
  2297. that hard on stuff that should be handled be the OS. Yes, Ive 
  2298. looked at TransSkel, PowerPlant, etc. Compared even to Visual BASIC  
  2299. they _suck_. 
  2300.  
  2301. Until there is something like Visual C++ (if there is and i havent  
  2302. seen it, please tell me! and i dont mean multi-thousand dollar 
  2303. packages.), ile leave 'Mac' programming to those who want it. 
  2304.  
  2305. All these defenses of mac-programming here confuse me; do you
  2306. folks WANT to work that hard on non-essentials? Doesnt anyone
  2307. wonder why Doom will be running on SGI and anything that runs
  2308. linux before it runs on Macs? In fact, ile make a prediction:
  2309. Doom will run as a linux app on PowerMacs before it runs as
  2310. a System 7.x app.
  2311.  
  2312. Still, i am impressed by the skill of those who can do this well.
  2313. I wont be one of them, even though i love my powermac.
  2314.  
  2315. damir
  2316. gt7092d@prism.gatech.edu
  2317.  
  2318.  
  2319.  
  2320.  
  2321.  
  2322.  
  2323.  
  2324. +++++++++++++++++++++++++++
  2325.  
  2326. >From Jens Alfke <jens_alfke@powertalk.apple.com>
  2327. Date: Mon, 25 Jul 1994 22:17:57 GMT
  2328. Organization: Apple Computer
  2329.  
  2330. Jon W!tte, d88-jwa@hemul.nada.kth.se writes:
  2331. > I can envision a future where OpenDoc works the wonders it's supposed
  2332. > to do, but as you say: it's all about adoption. And adoption right
  2333. > now is not feasible; there's not even a sanctioned way of using a
  2334. > scroll bar...
  2335.  
  2336. Hmm, you mentioned this once before in private e-mail. To do scrolling you
  2337. just use two frames; it's really almost exactly the way it works in MacApp
  2338. with a scroller view embedding the view to be scrolled. There is a new recipe
  2339. that describes how to do scrolling, which I can e-mail you.
  2340.  
  2341. Really, is this the main objection you have to OpenDoc? These things can seem
  2342. tricky, but recall all the problems you must have had figuring out how to do
  2343. scrolling and growing windows when you first learned to program the Mac ... I
  2344. know that moving the scrollbars around and invalidating the proper areas of
  2345. the window gave me fits. It's just a matter of learning new things.
  2346.  
  2347. And, back to the theme of this thread, the OpenDoc Parts Framework will take
  2348. care of the grungy details of scrolling for you.
  2349.  
  2350. --Jens Alfke
  2351.   jens_alfke@powertalk              Rebel girl, rebel girl,
  2352.             .apple.com              Rebel girl you are the queen of my world
  2353.  
  2354. +++++++++++++++++++++++++++
  2355.  
  2356. >From h+@nada.kth.se (Jon Wdtte)
  2357. Date: Tue, 26 Jul 1994 10:02:53 +0200
  2358. Organization: Royal Institute of Theoretical Theology
  2359.  
  2360. In article <1994Jul25.221757.24322@gallant.apple.com>,
  2361.  Jens Alfke <jens_alfke@powertalk.apple.com> wrote:
  2362.  
  2363. >Hmm, you mentioned this once before in private e-mail. To do scrolling you
  2364. >just use two frames; it's really almost exactly the way it works in MacApp
  2365. >with a scroller view embedding the view to be scrolled. There is a new recipe
  2366. >that describes how to do scrolling, which I can e-mail you.
  2367.  
  2368. Why wasn't that on the a6 source CD?
  2369.  
  2370. Indeed, the way I looked at it, you had to get at the root
  2371. view to install your scrollbar there, and that didn't really
  2372. work very well with embedding. There were also printing problems,
  2373. but I can live with them (who wants a scrollbar on their printout? :-)
  2374.  
  2375. >Really, is this the main objection you have to OpenDoc? These things can seem
  2376.  
  2377. No; it's the easiest objection. I could go on about what compiling
  2378. in CFront/MPW does to my productivity, but I won't :-)
  2379. There's also this undefined thing called memory layout. What if
  2380. you want to know how much memory you have to play with for
  2381. caching issues, or want to do your own "virtual memory" by
  2382. purging blocks to disk? There's no supported way of finding
  2383. this out; you just have to assume your component will have
  2384. "enough" for some default.
  2385.  
  2386. >And, back to the theme of this thread, the OpenDoc Parts Framework will take
  2387. >care of the grungy details of scrolling for you.
  2388.  
  2389. Any year now.
  2390.  
  2391. We were expected to talk about starting commercial part development
  2392. in the June Munic kitchen, when SOM wasn't there, embedding was a
  2393. black art, CFront was the only useable tool, ...
  2394. NO WAY! I think OpenDoc is a good idea, but it has to stabilize at
  2395. least SOMEWHAT, and the tools mess has to be sorted out before I
  2396. can spend time on business on it.
  2397.  
  2398. Cheers,
  2399.  
  2400.                     / h+
  2401.  
  2402. --
  2403.   Jon Wdtte
  2404.   Hagagatan 1
  2405.   113 48 Stockholm
  2406.   Sweden
  2407.  
  2408.  
  2409. +++++++++++++++++++++++++++
  2410.  
  2411. >From d88-jwa@hemul.nada.kth.se (Jon Wdtte)
  2412. Date: 25 Jul 1994 07:11:30 GMT
  2413. Organization: The Royal Institute of Technology
  2414.  
  2415. In <30u5jq$fvg@acmex.gatech.edu> gt7092d@prism.gatech.edu (Damir Smitlener) writes:
  2416.  
  2417. >looked at TransSkel, PowerPlant, etc. Compared even to Visual BASIC  
  2418. >they _suck_. 
  2419.  
  2420. Visual Basic is not in the same cathegory as PowerPlant or TCL.
  2421. Visual Basic is in the same cathegory as HyperCard 2.2 (which does
  2422. AppleScript as well)
  2423.  
  2424. >Until there is something like Visual C++ (if there is and i havent  
  2425. >seen it, please tell me! and i dont mean multi-thousand dollar 
  2426. >packages.), ile leave 'Mac' programming to those who want it. 
  2427.  
  2428. Why not pay a few thousand dollars for a good package? You paid
  2429. a lot for you Mac, you're going to earn your living with it, so
  2430. you'd better have decent tools, right?
  2431.  
  2432. As for a cheap tool, try Symantec C++ 7.0, which comes with an
  2433. interface builder (and the Think Class Library version 2.0) which
  2434. closely parallells Visual C++.
  2435.  
  2436. >All these defenses of mac-programming here confuse me; do you
  2437. >folks WANT to work that hard on non-essentials? Doesnt anyone
  2438.  
  2439. No; we DON'T work hard on essentials. Either we did it once
  2440. before, and copy/paste into a new project, or we use one of the
  2441. many good environments/frameworks available. But if you're the
  2442. typical lazy integrator consultant type, I'm not surprised you
  2443. don't want to do the research necessary before condemning a
  2444. platform you haven't used for any extended period of time.
  2445.  
  2446. -- 
  2447.  -- Jon W{tte, h+@nada.kth.se, Mac Software Engineer Deluxe --
  2448.  
  2449.    What we need is a good GNU [...] licence manager implementation.
  2450.                      -- Raphael Manfredi
  2451.  
  2452. +++++++++++++++++++++++++++
  2453.  
  2454. >From amundson@phenom.physics.wisc.edu (James F. Amundson)
  2455. Date: Mon, 25 Jul 1994 22:51:55 -0600
  2456. Organization: Division of Information Technology
  2457.  
  2458. In article <nagleCtCs2w.At9@netcom.com>, nagle@netcom.com (John Nagle) wrote:
  2459.  
  2460. >         There's also the "Nerdworks" library, which is a free class
  2461. > library available on Apple's "ftp.apple.com", and there's a book that
  2462. > goes with it.  This is a weak, but workable class library.
  2463.  
  2464. Hey! I'm interested in that! The problem is, I've looked all through
  2465. "ftp.apple.com" and found nothing. "dir-files-all" had no instances of
  2466. "nerd" or "works". Anyone care to point me to it?
  2467.  
  2468. Thanks,
  2469. Jim Amundson
  2470.  
  2471. +++++++++++++++++++++++++++
  2472.  
  2473. >From hpoppe@ncar.ucar.edu (Herb Poppe)
  2474. Date: 26 Jul 1994 15:40:23 GMT
  2475. Organization: National Center for Atmospheric Research
  2476.  
  2477. In article <amundson-2507942251550001@f181-079.net.wisc.edu>
  2478. amundson@phenom.physics.wisc.edu (James F. Amundson) writes:
  2479.  
  2480. > In article <nagleCtCs2w.At9@netcom.com>, nagle@netcom.com (John Nagle) wrote:
  2481. > >         There's also the "Nerdworks" library, which is a free class
  2482. > > library available on Apple's "ftp.apple.com", and there's a book that
  2483. > > goes with it.  This is a weak, but workable class library.
  2484. > Hey! I'm interested in that! The problem is, I've looked all through
  2485. > "ftp.apple.com" and found nothing. "dir-files-all" had no instances of
  2486. > "nerd" or "works". Anyone care to point me to it?
  2487.  
  2488. I couldn't find it either and I looked in directories other than /dts;
  2489. e.g., /pub. Is the "book that goes with it" in paper or electronic
  2490. form?
  2491.  
  2492.  
  2493. Herb Poppe             National Center for Atmospheric Research (NCAR)
  2494. hpoppe@ncar.ucar.edu   P.O. Box 3000
  2495. (303) 497-1296         Boulder, CO  80307  USA
  2496.  
  2497. +++++++++++++++++++++++++++
  2498.  
  2499. >From jpurlia@qualcomm.com (John Purlia)
  2500. Date: 26 Jul 1994 17:09:26 GMT
  2501. Organization: Qualcomm, Inc.
  2502.  
  2503. In article <30voj2$j37@news.kth.se>, d88-jwa@hemul.nada.kth.se (Jon Wdtte)
  2504. wrote:
  2505.  
  2506. > In <30u5jq$fvg@acmex.gatech.edu> gt7092d@prism.gatech.edu (Damir
  2507. Smitlener) writes:
  2508. > >All these defenses of mac-programming here confuse me; do you
  2509. > >folks WANT to work that hard on non-essentials? Doesnt anyone
  2510. > No; we DON'T work hard on essentials. Either we did it once
  2511. > before, and copy/paste into a new project, or we use one of the
  2512. > many good environments/frameworks available. But if you're the
  2513. > typical lazy integrator consultant type, I'm not surprised you
  2514. > don't want to do the research necessary before condemning a
  2515. > platform you haven't used for any extended period of time.
  2516.  
  2517. Exactly!!  I have a standard "John's Generic App" I use to start off just
  2518. about every project I begin.  All the standard event handling code is
  2519. there for handling menus, updates, clicks, idle time, etc...  I wrote it
  2520. once and it takes all of a couple hours to plug in specifics for a new
  2521. project.  The time is spent doing it right the first time and I believe
  2522. EVERY Mac programmer should go through this exercise in order to comprhend
  2523. what goes on "behind the scenes".
  2524.  
  2525. Why?
  2526.  
  2527. Because this basic understanding is essential if you ever want to take
  2528. your applications beyond the basic elements provided by a framework.  What
  2529. if you need to implement some special user interface element not provided
  2530. by the framework, or want to be extra nice to your users and manage
  2531. updates within your windows by carefully considering how regions are
  2532. validated and invalidated so as to reduce unnecessary (read, ugly)
  2533. redrawing?  You'll be much better equipped to produce extra functionality
  2534. and refinement in your app's if you've taken the time -- once -- to build
  2535. your own basic application.  Toss in a liberal dose of attention to
  2536. c.s.m.p, develop, Inside Mac, Tech Notes and sample code snippets, and the
  2537. rest is cut'n'paste.
  2538.  
  2539. -- John
  2540.  
  2541. ...........................................................................
  2542. John Purlia          : My brain; not my company's brain.  My brain says...
  2543. jpurlia@qualcomm.com :
  2544. Applelink    AM0470  :   "Newton could never live on Via de la Valle,
  2545. NewtonMail:  JPurlia :  but it would be right at home on Cruel Lucille"
  2546.  
  2547. +++++++++++++++++++++++++++
  2548.  
  2549. >From Jens Alfke <jens_alfke@powertalk.apple.com>
  2550. Date: Tue, 26 Jul 1994 22:07:34 GMT
  2551. Organization: Apple Computer
  2552.  
  2553.  Jon W!tte, h+@nada.kth.se writes:
  2554. > Why wasn't that [recipe] on the a6 source CD?
  2555.  
  2556. I said it was new! Joshua just finished writing it a few weeks ago.
  2557.  
  2558. > No; it's the easiest objection. I could go on about what compiling
  2559. > in CFront/MPW does to my productivity, but I won't :-)
  2560.  
  2561. We've switched to CodeWarrior/PPC for our development (although scpp should
  2562. still work.) Will that make you happy? ;-) Really, I hate MPW just as much as
  2563. you do, if not more.
  2564.  
  2565. > There's also this undefined thing called memory layout. What if
  2566. > you want to know how much memory you have to play with for
  2567. > caching issues
  2568.  
  2569. Well, that's really an issue with any memory scheme that doesn't fit you into
  2570. a predeclared partition size, i.e. almost any memory manager other than the
  2571. normal Mac one. Yes, it's a slightly different world. But the user will
  2572. appreciate not having to set partition sizes, esp. not for every individual
  2573. document! And it would really be infeasible to know how much memory any
  2574. particular document needed...
  2575.   Your part is free to use the Mac memory manager, by the way, as long as it
  2576. allocates stuff in temp memory.
  2577.  
  2578. > NO WAY! I think OpenDoc is a good idea, but it has to stabilize at
  2579. > least SOMEWHAT, and the tools mess has to be sorted out before I
  2580. > can spend time on business on it.
  2581.  
  2582. Well, that's the difference between alpha and beta. Alpha tends to be messier
  2583. and more unstable. On the other hand, if you start developing with alpha
  2584. software, you have more time to learn how the stuff works and more time to
  2585. write code. It's a trade-off anyone has to make. I hope you'll try out the
  2586. beta release when it ships (nope, I'm not allowed to make any statements
  2587. about schedule...)
  2588.  
  2589. --Jens Alfke
  2590.   jens_alfke@powertalk              Rebel girl, rebel girl,
  2591.             .apple.com              Rebel girl you are the queen of my world
  2592.  
  2593. +++++++++++++++++++++++++++
  2594.  
  2595. >From Mark Hanrek <hanrek@cts.com>
  2596. Date: Tue, 26 Jul 1994 21:12:04 GMT
  2597. Organization: The Information Workshop
  2598.  
  2599. >> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  2600. >> Jens Alfke wrote:
  2601. >>
  2602. >> And, the OpenDoc Parts Framework will take
  2603. >> care of the grungy details of scrolling for you.
  2604. >>
  2605. >- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  2606. > Jon W!tte writes:
  2607. >
  2608. > Any year now.
  2609. >
  2610. > We were expected to talk about starting commercial part development
  2611. > in the June Munic kitchen, when SOM wasn't there, embedding was a
  2612. > black art, CFront was the only useable tool, ...
  2613. >
  2614. > NO WAY! I think OpenDoc is a good idea, but it has to stabilize at
  2615. > least SOMEWHAT, and the tools mess has to be sorted out before I
  2616. > can spend time on business on it.
  2617. >
  2618.  
  2619. Jon,
  2620.  
  2621. >From your point of view, it seems you feel the OpenDoc team has made some
  2622. big mistakes.
  2623.  
  2624. >From my point of view, which is simply "one other point of view", I have
  2625. a high regard for the tough and appropriate choices the OpenDoc team has
  2626. made.  
  2627.  
  2628. Who's perspective is the more accurate one?
  2629.  
  2630.  
  2631. - --- The Answer
  2632.  
  2633. There IS a problem here, and it has a symptom, and it has a cause.
  2634.  
  2635. The SYMPTOM is the the inaccurate perception of something.
  2636.  
  2637. The CAUSE is the non-regard for the way in which information is handled.
  2638.  
  2639.  
  2640. - -- Pervasiveness
  2641.  
  2642. Jon, you are not to blame for your inaccurate assessment of the OpenDoc
  2643. development.  
  2644.  
  2645. You, along with all the rest of us, are not provided with the properly
  2646. sequenced information needed so that we CAN form an accurate perception,
  2647. or develop the skills to utilize that knowledge in an appropriate amount
  2648. of time.
  2649.  
  2650. And "OpenDoc" is no different than any other software subject.
  2651.  
  2652.  
  2653. - -- A Metaphor
  2654.  
  2655. It's almost as though all the "bits of knowledge" are just dropped into a
  2656. pile in the middle of the room, and if we REALLY want to participate, it
  2657. is up to us to just dive in and sort it all out.
  2658.  
  2659. But wait!  If I really want to be accurate here...
  2660.  
  2661. ... I must add that many, if not most, of those pieces only exist for a
  2662. short period of time, and disappear before you have a chance to grab 'em.
  2663.  
  2664. But that's okay. Fresh batches of new DIFFERENT pieces are continuously
  2665. dumped into that pile.
  2666.  
  2667. To be more accurate still...
  2668.  
  2669. ... there isn't just one pile, but there are at least 12 (at last count).
  2670.  Do you have access to all those piles?  You could spend a week chasing a
  2671. bug that was solved in one of those piles that you missed!
  2672.  
  2673.     Are we programmers, or must we be "pile-masters" as well?
  2674.  
  2675.  
  2676. - -- Action Items
  2677.  
  2678. The PROBLEM is so huge it is like an epidemic of cancer.
  2679.  
  2680. The SOLUTION is easily attainable.
  2681.  
  2682. We can't ignore this anymore.
  2683.  
  2684.  
  2685.  
  2686. Mark Hanrek
  2687. The Information Workshop
  2688.  
  2689. +++++++++++++++++++++++++++
  2690.  
  2691. >From ross@bnr.ca (Ross Brown)
  2692. Date: Wed, 27 Jul 1994 11:37:27 -0400
  2693. Organization: Bell-Northern Research
  2694.  
  2695. In article <CtKG85.4AK@crash.cts.com>, Mark Hanrek <hanrek@cts.com> wrote:
  2696.  
  2697. >     Are we programmers, or must we be "pile-masters" as well?
  2698.  
  2699. Apple's APIculture has turned us all into coder bees!  ;-)
  2700.  
  2701. -- 
  2702. Ross Brown
  2703. Macintosh/UNIX Systems Integration
  2704. Bell-Northern Research Ltd.
  2705. ross@bnr.ca
  2706.  
  2707. +++++++++++++++++++++++++++
  2708.  
  2709. >From Jens Alfke <jens_alfke@powertalk.apple.com>
  2710. Date: Wed, 27 Jul 1994 21:13:03 GMT
  2711. Organization: Apple Computer
  2712.  
  2713. Mark Hanrek, hanrek@cts.com writes:
  2714. > You, along with all the rest of us, are not provided with the properly
  2715. > sequenced information needed so that we CAN form an accurate perception,
  2716. > or develop the skills to utilize that knowledge in an appropriate amount
  2717. > of time.
  2718.  
  2719. In all seriousness I'd like to ask what we [the OpenDoc team] could do
  2720. better. You have the architecture description, you have (preliminary) API
  2721. documentation and recipes, you have sample code, you have hours of WWDC
  2722. videos, you even have the full source code to all of OpenDoc. There is also a
  2723. mailing list (OpenDoc-Interest) where one can ask questions, which usually
  2724. get answered by the engineering team.
  2725.   Keep in mind that what you have is an _alpha_ release and is quite
  2726. preliminary. The documentation isn't really there yet, but Tech Pubs is in
  2727. high gear right now putting it together. The beta release will be better
  2728. documented; if you find that the effort needed to understand the alpha
  2729. release is not worth the benefit in early use of the software, then you can
  2730. wait for the beta release.
  2731.  
  2732. > The PROBLEM is so huge it is like an epidemic of cancer.
  2733. > The SOLUTION is easily attainable.
  2734.  
  2735. You titled this section "Action Items" but didn't provide any. If the
  2736. solution is easily attainable, what is it?? Again, I'm not being sarcastic...
  2737.  
  2738. --Jens Alfke
  2739.   jens_alfke@powertalk              Rebel girl, rebel girl,
  2740.             .apple.com              Rebel girl you are the queen of my world
  2741.  
  2742. ---------------------------
  2743.  
  2744. >From Ned Mantei <mantei@neuro.biol.ethz.ch>
  2745. Subject: What does "reentrant" mean?
  2746. Date: 19 Jul 1994 10:12:51 GMT
  2747. Organization: Neurobiology, ETH-Zurich
  2748.  
  2749. In view of the recent thread on "reentrancy and the Power Mac runtime
  2750. model", I would appreciate an explanation of the term "reentrant". 
  2751. Thanks.
  2752. Ned Mantei 
  2753. Dept. of Neurobiology , Swiss Federal Institute of Technology 
  2754. CH-8093 Zurich, Switzerland
  2755.  
  2756. +++++++++++++++++++++++++++
  2757.  
  2758. >From decartwr@newstand.syr.edu (Dana Cartwright 3rd)
  2759. Date: 19 Jul 1994 11:22:35 GMT
  2760. Organization: Syracuse University, Syracuse NY, USA
  2761.  
  2762. Ned Mantei (mantei@neuro.biol.ethz.ch) wrote:
  2763. : In view of the recent thread on "reentrancy and the Power Mac runtime
  2764. : model", I would appreciate an explanation of the term "reentrant".
  2765.  
  2766. Well, conceptually it's simple, although in practice it gets a bit more
  2767. complex.  "Reentrant" simply means "software which does not modify itself".
  2768. But read on....
  2769.  
  2770. Originally, computer software was NOT reentrant.  John von Neuman,
  2771. inventor of the "von Neuman" computer from which all modern computers
  2772. are descended, indeed thought that the essence of a computer was that
  2773. it could modify its own software on the fly, that is, to be a computer
  2774. meant that it *had* to have the capability of having self-modifying
  2775. code.
  2776.  
  2777. And the world bought into this notion.  It took DECADES to realize
  2778. that he was wrong (on this one point--he was a great man, but he
  2779. slipped slighly on this point). 
  2780.  
  2781. Modern programmers who only write application software may find the
  2782. concept of "reentrant" a bit puzzling; if you write in C and don't
  2783. do tricky things, you automatically and painlessly get reentrant
  2784. code.  Ditto all other languages above assembler.
  2785.  
  2786. But what get you in trouble are "store to memory" operations which
  2787. go directly to a fixed memory location.  For example, on the Mac,
  2788. all those lousy low-memory globals violate re-entrancy, if you
  2789. write to them.
  2790.  
  2791. What's the point of all this?  Well, reentrant software has the
  2792. property that you can (a) in effect run multiple copies of the 
  2793. software without actually having multiple copies sitting around;
  2794. all the "copies" can execute from a single master copy (since
  2795. it's read-only, everyone can read from the same copy), and     
  2796. (b) pre-emptive multi-tasking ONLY works with reentrant code.
  2797.  
  2798. OK, I'm tired of typing....there is much more which could be said,
  2799. but that's the gist of it.
  2800.  
  2801.  
  2802. +++++++++++++++++++++++++++
  2803.  
  2804. >From Gavin@UMich.EDU (Gavin Eadie)
  2805. Date: Tue, 19 Jul 1994 10:32:44 -0400
  2806. Organization: University of Michigan
  2807.  
  2808. In article <30gd1r$h44@newstand.syr.edu>, decartwr@newstand.syr.edu (Dana
  2809. Cartwright 3rd) wrote:
  2810.  
  2811. > Ned Mantei (mantei@neuro.biol.ethz.ch) wrote:
  2812. > : In view of the recent thread on "reentrancy and the Power Mac runtime
  2813. > : model", I would appreciate an explanation of the term "reentrant".
  2814. >  
  2815. > Well, conceptually it's simple, although in practice it gets a bit more
  2816. > complex.  "Reentrant" simply means "software which does not modify itself".
  2817. > But read on....
  2818. >  
  2819.    Strictly speaking, this is misleading because "software which does not
  2820. modify itself" is not necessarily reentrant.  The word 'reentrant' is the
  2821. clue - it is software which can be 'entered' again and again.  Imagine,
  2822. for example, a subroutine which performs some action and it is called by
  2823. some application.  While that subroutine is halfway done, and interrupt is
  2824. taken and the interrupt processing code also calls the subroutine.  For
  2825. this to cause no trouble the subroutine must be reentrant.  It's true that
  2826. if the subroutine modified itself this would, probably, cause trouble
  2827. (though self modification is possible in reentrant code if you're
  2828. careful); it's also the case that if the routine modified global
  2829. variables, that would cause trouble too.  But the real definition is only
  2830. that the routine can be entered multiple times 'simultaniously' and still
  2831. perform desired actions ... Gav
  2832.  
  2833. -- 
  2834. Gavin Eadie // U of Michigan Information Systems
  2835.  
  2836. +++++++++++++++++++++++++++
  2837.  
  2838. >From dubois@primate.wisc.edu (Paul DuBois)
  2839. Date: 19 Jul 1994 11:33:00 -0500
  2840. Organization: Castra Parvulorum
  2841.  
  2842. >From article <30g8v3$5a7@elna.ethz.ch>, by Ned Mantei <mantei@neuro.biol.ethz.ch>:
  2843. > In view of the recent thread on "reentrancy and the Power Mac runtime
  2844. > model", I would appreciate an explanation of the term "reentrant". 
  2845.  
  2846. It means you can use it twice before it crashes.
  2847. -- 
  2848. Paul DuBois
  2849. dubois@primate.wisc.edu
  2850.  
  2851. +++++++++++++++++++++++++++
  2852.  
  2853. >From resnick@uiuc.edu (Pete Resnick)
  2854. Date: Tue, 19 Jul 1994 15:14:10 -0500
  2855. Organization: University of Illinois at Urbana-Champaign
  2856.  
  2857. Dana's article is almost completely wrong.
  2858.  
  2859. In article <30gd1r$h44@newstand.syr.edu>, decartwr@newstand.syr.edu (Dana
  2860. Cartwright 3rd) wrote:
  2861.  
  2862. >Well, conceptually it's simple, although in practice it gets a bit more
  2863. >complex.  "Reentrant" simply means "software which does not modify itself".
  2864.  
  2865. No, reentrant only means "able to start execution while already executing
  2866. in another context". There can be self-modifying code that is reentrant,
  2867. and there can be non-reentrant code that is not self modifying. The
  2868. characterization that Dana presents is completely false.
  2869.  
  2870. >Originally, computer software was NOT reentrant.  John von Neuman
  2871. >[...]indeed thought that the essence of a computer was that
  2872. >it could modify its own software on the fly, that is, to be a computer
  2873. >meant that it *had* to have the capability of having self-modifying
  2874. >code.
  2875.  
  2876. Universal Turing machines are self-modifying. I don't thing von Neuman
  2877. came up with that. The key to a von Neuman machine is that *code is in
  2878. memory*.
  2879.  
  2880. >And the world bought into this notion.  It took DECADES to realize
  2881. >that he was wrong...
  2882.  
  2883. No! Do you think that every program should be in ROM?? The code of a
  2884. Macintosh is modified *every time* you open an application. Loading new
  2885. code into memory is modifying code. This is *EXACTLY* what we want
  2886. computers to do. Using pure ROM for code is completely outdated. There are
  2887. certain parts of code that we often don't want modified and so take
  2888. troubles to put in memory that is treated as temporarily unmodifiable, but
  2889. the world has not thought any the less of von Neuman machines in this
  2890. regard.
  2891.  
  2892. >Modern programmers who only write application software may find the
  2893. >concept of "reentrant" a bit puzzling; if you write in C and don't
  2894. >do tricky things, you automatically and painlessly get reentrant
  2895. >code.  Ditto all other languages above assembler.
  2896.  
  2897. Wrong again. Use the Time Manager on the Macintosh. Use the Device Manager
  2898. with completion routines. Then go and write some results to some memory in
  2899. a pointer which you allocated in your main loop. Now you are not reentrant
  2900. and you haven't done anything particularly "tricky". The key to reentrancy
  2901. is that you need to make sure your code can be called from somewhere else
  2902. even if it is already in the middle of running.
  2903.  
  2904. >But what get you in trouble are "store to memory" operations which
  2905. >go directly to a fixed memory location.  For example, on the Mac,
  2906. >all those lousy low-memory globals violate re-entrancy, if you
  2907. >write to them.
  2908.  
  2909. It's not just low-memory globals. It's any constant memory location that
  2910. your program has access to.
  2911.  
  2912. >What's the point of all this?  Well, reentrant software has the
  2913. >property that you can (a) in effect run multiple copies of the 
  2914. >software without actually having multiple copies sitting around;
  2915. >all the "copies" can execute from a single master copy (since
  2916. >it's read-only, everyone can read from the same copy
  2917.  
  2918. Again, being read-only doesn't make it reentrant.
  2919.  
  2920. >(b) pre-emptive multi-tasking ONLY works with reentrant code.
  2921.  
  2922. That's simply false. The operating system can perfectly well deal with
  2923. code that is not itself reentrant in a pre-emptive multi-tasking
  2924. environment.
  2925.  
  2926. pr
  2927. -- 
  2928. Pete Resnick        (...so what is a mojo, and why would one be rising?)
  2929. Doctoral Student - Philosophy Department, Gregory Hall, UIUC
  2930. System manager - Cognitive Science Group, Beckman Institute, UIUC
  2931. Internet: resnick@uiuc.edu
  2932.  
  2933. +++++++++++++++++++++++++++
  2934.  
  2935. >From coopem@panix.com (Marc Cooperman)
  2936. Date: 20 Jul 1994 01:41:37 GMT
  2937. Organization: Jumpstart Technologies, Inc.
  2938.  
  2939. The practical definition:
  2940.  
  2941. "re-entrant" routines can be called again and again from unforseen
  2942. places in your code, at unforseen times, and they won't break, like all
  2943. that other C code you've written
  2944.  
  2945. If you program linearly (you can trace a single execution path through your
  2946. code that does not double back on itself) you don't have to worry much
  2947. about
  2948. this
  2949.  
  2950. if you program event driven code (like, on a Mac, you know...) that's got
  2951. a million disgusting permutations to how it can run, you may have
  2952. "re-entrancy" problems, although it is possible to write safe code by
  2953. accident
  2954.  
  2955. A general rule - a re-entrant procedure should operate on its own copies of
  2956. data (automatic variables) wherever possible. If you must change a value
  2957. passed in by reference, you probably want to lock the code, to prevent it
  2958. from re-entering, before the changes are complete. Either that, or hold the
  2959. caller responsible for providing memory to store results and ensuring
  2960. proper calling sequence - never write to global variables within the
  2961. library!
  2962.  
  2963. +++++++++++++++++++++++++++
  2964.  
  2965. >From nagle@netcom.com (John Nagle)
  2966. Date: Wed, 20 Jul 1994 16:00:47 GMT
  2967. Organization: NETCOM On-line Communication Services (408 261-4700 guest)
  2968.  
  2969. decartwr@newstand.syr.edu (Dana Cartwright 3rd) writes:
  2970. >Ned Mantei (mantei@neuro.biol.ethz.ch) wrote:
  2971. >: In view of the recent thread on "reentrancy and the Power Mac runtime
  2972. >: model", I would appreciate an explanation of the term "reentrant".
  2973.  
  2974. >Originally, computer software was NOT reentrant.  John von Neuman,
  2975. >inventor of the "von Neuman" computer from which all modern computers
  2976. >are descended, indeed thought that the essence of a computer was that
  2977. >it could modify its own software on the fly, that is, to be a computer
  2978. >meant that it *had* to have the capability of having self-modifying
  2979. >code.
  2980. >And the world bought into this notion.  It took DECADES to realize
  2981. >that he was wrong (on this one point--he was a great man, but he
  2982. >slipped slighly on this point). 
  2983.  
  2984.        No, the "B-box", the first index register, was invented in
  2985. Britain in the mid-50s.  Before index registers, the only way to 
  2986. subscript an array was to store into the address part of instructions.
  2987. Once index registers were invented, most of the need to modify code
  2988. during execution went away.
  2989.  
  2990.        Once index registers were invented, the big remaining problem
  2991. was storing subroutine return points.  Using a stack fixed that one,
  2992. along with providing a separate set of local variables for each
  2993. invocation of a function.
  2994.  
  2995.        In C-type languages, functions that have no static variables
  2996. are generally reentrant.  It's sharing of resources between separate
  2997. invocations of the same function that breaks reentrancy.
  2998.  
  2999.                     John Nagle
  3000.  
  3001. +++++++++++++++++++++++++++
  3002.  
  3003. >From Jens Alfke <jens_alfke@powertalk.apple.com>
  3004. Date: Wed, 20 Jul 1994 19:51:52 GMT
  3005. Organization: Apple Computer
  3006.  
  3007. Ned Mantei, mantei@neuro.biol.ethz.ch writes:
  3008. > In view of the recent thread on "reentrancy and the Power Mac runtime
  3009. > model", I would appreciate an explanation of the term "reentrant". 
  3010.  
  3011. "Re-entrant" means a call to a subroutine that is already executing. A
  3012. recursive call would be the most straightforward example. This could include
  3013. indirect recursion where A calls B, B calls C, and C calls A. You can also
  3014. get re-entrancy if a routine triggeredy by an interrupt calls a function that
  3015. was already executing when the interrupt occurred, or if a process-switch
  3016. happens while the function is executing and the next process to run also
  3017. calls that function.
  3018.  
  3019. Most of the Mac OS and Toolbox routines are not re-entrant; that is, they
  3020. will not work properly when called re-entrantly. This is why you can't call
  3021. Memory Manager routines from an interrupt (you might have interrupted a MM
  3022. routine, so the heap structures might be in an inconsistent state.) It's also
  3023. why you can't have multiple Standard File dialogs open at the same time (the
  3024. Std File package uses several low-memory globals, and two instances of it
  3025. would fight over those globals.)
  3026.  
  3027. This is one of the major things that has to be fixed with the OS for the
  3028. Copland and Gershwin releases.
  3029.  
  3030. --Jens Alfke
  3031.   jens_alfke@powertalk              Rebel girl, rebel girl,
  3032.             .apple.com              Rebel girl you are the queen of my world
  3033.  
  3034. +++++++++++++++++++++++++++
  3035.  
  3036. >From mem8321@u.cc.utah.edu (Mark Miller)
  3037. Date: 24 Jul 1994 17:21:36 -0600
  3038. Organization: University of Utah Computer Center, Salt Lake City, Ut.
  3039.  
  3040. In article <30gd1r$h44@newstand.syr.edu>,
  3041. Dana Cartwright 3rd <decartwr@newstand.syr.edu> wrote:
  3042. >Ned Mantei (mantei@neuro.biol.ethz.ch) wrote:
  3043. >: In view of the recent thread on "reentrancy and the Power Mac runtime
  3044. >: model", I would appreciate an explanation of the term "reentrant".
  3045. >Well, conceptually it's simple, although in practice it gets a bit more
  3046. >complex.  "Reentrant" simply means "software which does not modify itself".
  3047. >But read on....
  3048.  
  3049. For a program to be reentrant, it must satisfy one of the following
  3050. three conditions:
  3051.  
  3052. 1. Use no global variables
  3053. 2. Be programmed VERY carefully to account for a small number of shared
  3054.    globals.
  3055. 3. Be used with a linker / loader that creates a new global data segment
  3056.    for each instance of the program running.  Allowing each instance to
  3057.    use its own segment either requires referencing all global variables
  3058.    from a register base (A5?) or having different address spaces for each
  3059.    instance with an MMU.
  3060.  
  3061. Other than these conditions, and not using self-modifying code, reentrant
  3062. programs may do anything else that is legal under a multitasking
  3063. environment, including accessing shared system globals, as long as proper
  3064. resource locking and task switching procedures are followed.
  3065.  
  3066.   - Mark.
  3067.  
  3068. +++++++++++++++++++++++++++
  3069.  
  3070. >From ldo@waikato.ac.nz (Lawrence D'Oliveiro, Waikato University)
  3071. Date: 25 Jul 94 17:33:19 +1200
  3072. Organization: University of Waikato, Hamilton, New Zealand
  3073.  
  3074. In article <30gd1r$h44@newstand.syr.edu>, decartwr@newstand.syr.edu (Dana Cartwright 3rd) writes:
  3075. >
  3076. > Originally, computer software was NOT reentrant.  John von Neuman,
  3077. > inventor of the "von Neuman" computer from which all modern computers
  3078. > are descended, indeed thought that the essence of a computer was that
  3079. > it could modify its own software on the fly, that is, to be a computer
  3080. > meant that it *had* to have the capability of having self-modifying
  3081. > code.
  3082. >
  3083. > And the world bought into this notion.  It took DECADES to realize
  3084. > that he was wrong (on this one point--he was a great man, but he
  3085. > slipped slighly on this point).
  3086.  
  3087. No, he wasn't wrong. What happened is that certain people have chosen to
  3088. misunderstand the essence of his idea. "Self-modifying" code conjures up
  3089. visions of nasty low-level assembly hacks, and, yes, I've seen a few in my time.
  3090. But a better concept is "generating code at run-time". As soon as you put
  3091. it this way, you start to see that there isn't anything inherently evil about
  3092. it. It's a neat technique, quite easy to use in a controlled way from a high-
  3093. level language, and on the Mac in particular, it solves a whole class of very
  3094. fiddly problems (passing data to callback/completion routines etc) in one
  3095. stroke.
  3096.  
  3097. Lawrence
  3098. driving on the left of the Information Superhighway
  3099.  
  3100. +++++++++++++++++++++++++++
  3101.  
  3102. >From ldo@waikato.ac.nz (Lawrence D'Oliveiro, Waikato University)
  3103. Date: 25 Jul 94 17:47:07 +1200
  3104. Organization: University of Waikato, Hamilton, New Zealand
  3105.  
  3106. In article <30ut20$ql@u.cc.utah.edu>, mem8321@u.cc.utah.edu (Mark Miller) writes:
  3107. >
  3108. > For a program to be reentrant, it must satisfy one of the following
  3109. > three conditions:
  3110. >
  3111. > 1. Use no global variables
  3112.  
  3113. And what, pray tell, are the CPU registers, if not global variables?
  3114.  
  3115. > 2. Be programmed VERY carefully to account for a small number of shared
  3116. >    globals.
  3117.  
  3118. Ah, you contradict point 1, which is just as well. The operative word is not
  3119. "small". The operative word is "consistency". Consider the entire RAM of your
  3120. machine. Consider the entire file system on your hard disk. These constitute
  3121. large collections of global data, being operated on by dozens, nay, hundreds
  3122. of concurrent processes running in your machine all at the same time. How do
  3123. you think they avoid stuffing each other up? There are various techniques in
  3124. use:
  3125.  
  3126. * Demarcation of responsibility. Not every process needs access to every bit
  3127. of data at the same time.
  3128. * Interlocks for those cases where two processes _do_ need access to the same
  3129. bit of data at the same time.
  3130.  
  3131. By obeying a few carefully-chosen conventions, you can manage reentrant access
  3132. to an arbitrarily large amount of shared global data.
  3133.  
  3134. > 3. Be used with a linker / loader that creates a new global data segment
  3135. >    for each instance of the program running.  Allowing each instance to
  3136. >    use its own segment either requires referencing all global variables
  3137. >    from a register base (A5?) or having different address spaces for each
  3138. >    instance with an MMU.
  3139.  
  3140. There is an alternative approach, typified by VAX/VMS. Most code under VMS
  3141. is reentrant. This particularly includes shared libraries. User programs can
  3142. have any number of shared libraries linked into them, and a library can't
  3143. depend on occupying the same address space in one program invocation as in
  3144. another. The VAX has no base registers, like A5 on the Mac, or like I understand
  3145. the PowerPC architecture has. So all that's guaranteed is that each library
  3146. maps into its own contiguous section of memory space. Its code and data are
  3147. adjacent to each other, so providing all intra-library references use relative
  3148. addressing, things continue to work.
  3149.  
  3150. Of course, inter-library references are a different matter. This is handled
  3151. by adding a "fixup" section to the library: all code references to other
  3152. libraries go indirect via the fixup section, and there is also a table of
  3153. references within library data structures which need fixing up.
  3154.  
  3155. Lawrence
  3156. chuffing along the Information Railroad (if you think that's less cool than
  3157. tooling along the Information Superhighway, just wait until the next level
  3158. crossing).
  3159.  
  3160. +++++++++++++++++++++++++++
  3161.  
  3162. >From quinn@cs.uwa.edu.au (Quinn "The Eskimo!")
  3163. Date: Tue, 26 Jul 1994 11:20:05 +0800
  3164. Organization: Department of Computer Science, The University of Western Australia
  3165.  
  3166. In article <1994Jul25.173319.31386@waikato.ac.nz>, ldo@waikato.ac.nz
  3167. (Lawrence D'Oliveiro, Waikato University) wrote:
  3168.  
  3169. >No, he wasn't wrong. What happened is that certain people have chosen to
  3170. >misunderstand the essence of his idea. "Self-modifying" code conjures up
  3171. >visions of nasty low-level assembly hacks, and, yes, I've seen a few in my
  3172. >time.
  3173.  
  3174. Hey, I've perpertrated a few "nasty low-level assembly hacks" in my time (:
  3175. -- 
  3176. Quinn "The Eskimo!"      <quinn@cs.uwa.edu.au>     "Support HAVOC!"
  3177. Department of Computer Science, The University of Western Australia
  3178.   But the nastiest one ever was the self-modifying Pascal under CP/M (: 
  3179.  
  3180. ---------------------------
  3181.  
  3182. End of C.S.M.P. Digest
  3183. **********************
  3184.  
  3185.  
  3186.